summaryrefslogtreecommitdiffhomepage
path: root/julia.html.markdown
diff options
context:
space:
mode:
authorLeah Hanson <astrieanna@gmail.com>2013-07-01 18:00:13 -0400
committerLeah Hanson <astrieanna@gmail.com>2013-07-01 18:00:13 -0400
commit7b21a8ae1bdd909b9923290f588ffae17ea960a5 (patch)
tree4424cd776a332328a15281aeff9122f357b26c90 /julia.html.markdown
parent3ebd8c55fd018aec6381ef69cca9c9f55f0e4796 (diff)
added another dictionary-for-loop example
Diffstat (limited to 'julia.html.markdown')
-rw-r--r--julia.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/julia.html.markdown b/julia.html.markdown
index c6e54f70..222a490a 100644
--- a/julia.html.markdown
+++ b/julia.html.markdown
@@ -269,6 +269,10 @@ for a in ["dog"=>"mammal","cat"=>"mammal","mouse"=>"mammal"]
println("$(a[1]) is $(a[2])")
end
+for (k,v) in ["dog"=>"mammal","cat"=>"mammal","mouse"=>"mammal"]
+ println("$k is $v")
+end
+
# While loops go until a condition is no longer met.
# prints: