Logo

Programming-Idioms

History of Idiom 8 > diff from v50 to v51

Edit summary for version 51 by justafoo:
[JS] idiomatic syntax

Version 50

2019-09-26, 14:58:39

Version 51

2019-09-26, 17:47:16

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
const x = {one: 1, two:2}
Comments bubble
An object in JavaScript is essentially an associative array
Comments bubble
An object in JavaScript is essentially an associative array