Associative array/Creation: Difference between revisions

→‎{{header|LOLCODE}}: Add implementation
(Added GNU APL equivalent)
(→‎{{header|LOLCODE}}: Add implementation)
Line 2,128:
remprop "animals "dog
show plist "animals ; [mouse 11 cat 5]</lang>
 
=={{header|LOLCODE}}==
BUKKITs are associative arrays
<lang lolcode>HAI 1.2
I HAS A Hash ITZ A BUKKIT
Hash HAS A key1 ITZ "val1" BTW This works for identifier-like keys, like obj.key in JavaScript
Hash HAS A SRS "key-2" ITZ 1 BTW Non-identifier keys need the SRS
VISIBLE Hash'Z SRS "key-2"
KTHXBYE
</lang>
{{Out}}
<pre>1</pre>
 
=={{header|Lua}}==
1,480

edits