Hash from two arrays: Difference between revisions
Content added Content deleted
(→{{header|AutoHotkey}}: AutoHotkey example added) |
|||
Line 75: | Line 75: | ||
del hash hash</lang> |
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}}== |
=={{header|AWK}}== |
||
Awk arrays are used for both lists and hash maps. |
Awk arrays are used for both lists and hash maps. |