Logo

Programming-Idioms

History of Idiom 134 > diff from v13 to v14

Edit summary for version 14 by programming-idioms.org:
[JS] Better with a semicolon

Version 13

2016-10-20, 12:04:16

Version 14

2016-10-21, 12:32:26

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Idiom #134 Create a new list

Declare and initialize a new list items, containing 3 elements a, b, c.

Extra Keywords
array vector slice tuple
Extra Keywords
array vector slice tuple
Code
var items = [a, b, c]
Code
var items = [a, b, c];
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array