Jump to content

Associative array/Iteration: Difference between revisions

m
MiniScript: added comment and changed map name to avoid built-in type
No edit summary
m (MiniScript: added comment and changed map name to avoid built-in type)
Line 2,083:
 
=={{header|MiniScript}}==
<lang MiniScript>mapd = { 3: "test", "foo": 3 }
 
for keyVal in mapd
print keyVal // produces results like: { "key": 3, "value": "test" }
end for
 
for key in mapd.indexes
print key
end for
 
for val in mapd.values
print val
end for</lang>
222

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.