Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript converting an array into a map

const arr = ['a', 'b', 'c', 2, 3, 4];
const nwMap = new Map([...arr.entries()]); 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #converting #array #map
ADD COMMENT
Topic
Name
6+2 =