Logo

Programming-Idioms

History of Idiom 134 > diff from v34 to v35

Edit summary for version 35 by justafoo:
[JS] idiomatic js

Version 34

2019-09-26, 15:38:52

Version 35

2019-09-26, 18:03:49

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
const 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