Logo

Programming-Idioms

History of Idiom 8 > diff from v46 to v47

Edit summary for version 47 by yuchi:
[JS] It is not JSON but actually a plain object literal in JavaScript

Version 46

2019-06-07, 10:26:12

Version 47

2019-09-26, 14:55:34

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Extra Keywords
table dictionary hash
Extra Keywords
table dictionary hash
Code
var x = {"one": 1, "two":2}
Code
var x = {"one": 1, "two":2}
Comments bubble
This JSON object is essentially an associative array
Comments bubble
An object in JavaScript is essentially an associative array