Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 1 to one

const map = new Map([
    [ 1, 'one' ],
    [ 2, 'two' ],
    [ 3, 'three' ], // trailing comma is ignored
]);
Source by exploringjs.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+8 =