Table of Contents

dotimes

(dotimes (variable value)
   statement)

dotimes_statement.jpg

Example

(ns clojure.examples.hello
   (:gen-class))

;; This program displays Hello World
(defn Example []
   (dotimes [n 5]
   (println n)))
(Example)

Output

0
1
2
3
4

Refs