Associative array/Iteration: Difference between revisions

m (MiniScript: added comment and changed map name to avoid built-in type)
Line 272:
 
<lang arturo>// create a dictionary
dict: #{
name: "john"
surname: "doe"
age: 33
}
 
Line 283:
}
 
print "----"
 
// Iterate over keys
loop $([keys dict)] {
print "key = " + &
}
 
print "----"
 
// Iterate over values
loop $([values dict)] {
print "value = " + &
}</lang>
1,532

edits