Jump to content

Hash from two arrays: Difference between revisions

→‎{{header|AutoHotkey}}: AutoHotkey example added
(→‎{{header|AutoHotkey}}: AutoHotkey example added)
Line 75:
del hash hash</lang>
 
=={{header|AutoHotkey}}==
<lang AutoHotkey>array1 := ["two", "three", "apple"]
array2 := [2, 3, "fruit"]
hash := {}
Loop % array1.maxIndex()
hash[array1[A_Index]] := array2[A_Index]
MsgBox % hash["apple"] "`n" hash["two"]</lang>
=={{header|AWK}}==
Awk arrays are used for both lists and hash maps.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.