Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript Get Key/Values of Map

let map1 = new Map();
map1.set('name', 'Jack');
map1.set('age', '27');

// looping through the Map
for (let elem of map1.entries()) {
    console.log(`${elem[0]}: ${elem[1]}`);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get child element by parent id 
Javascript :: codeigniter 3 if ajax request 
Javascript :: javascript string remove substring 
Javascript :: next router 
Javascript :: what is jsx in react 
Javascript :: await in react in function component 
Javascript :: loop through array in javascript 
Javascript :: how to convert integer to double in javascript 
Javascript :: conditional style prop react 
Javascript :: js looping through array 
Javascript :: jquery 1 cdn 
Javascript :: make form submit on new tab using jquery 
Javascript :: formdata array of objects 
Javascript :: define an unsigned long int js 
Javascript :: javascript get sub array 
Javascript :: cookie clicker hack extension 
Javascript :: jquery convert time to 1day 2 minutes 4 seconds 
Javascript :: scroll to top 
Javascript :: link href javascript 
Javascript :: paper material ui 
Javascript :: create a json object in javascript 
Javascript :: if text exists in element using javascript 
Javascript :: Sorting an array of objects by property values 
Javascript :: javascript edit form value 
Javascript :: floating button react 
Javascript :: indexof method javascript 
Javascript :: event module in node js 
Javascript :: js class exists 
Javascript :: element clicked js 
Javascript :: using async function in useeffect 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =