Associative array/Creation: Difference between revisions
Content added Content deleted
(Added GNU APL equivalent) |
(→{{header|LOLCODE}}: Add implementation) |
||
Line 2,128: | Line 2,128: | ||
remprop "animals "dog |
remprop "animals "dog |
||
show plist "animals ; [mouse 11 cat 5]</lang> |
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}}== |
=={{header|Lua}}== |