Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
Smalltalk: what is (link) a strong/weak reference
Line 513:
["Sally Smart"] = "555-9999",
["John Doe"] = "555-1212",
["J. Random Hacker"] = "553-1337", -- Trailing comma is OK
}
 
aTable = {
-- Table as value
subTable = { 5, 7.5, k = true }, -- key is "subTable"
-- Function as value
['John Doe'] = function (age) if age < 18 then return "Young" else return "Old!" end end,