RosettaCodeData/Task/Hash-from-two-arrays/Fantom/hash-from-two-arrays.fantom
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

16 lines
296 B
Text

class Main
{
public static Void main ()
{
keys := [1,2,3,4,5]
values := ["one", "two", "three", "four", "five"]
// create an empty map
map := [:]
// add the key-value pairs to it
keys.size.times |Int index|
{
map.add(keys[index], values[index])
}
}
}