Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript for...of with Maps

// define Map
let map = new Map();

// inserting elements
map.set('name', 'Jack');
map.set('age', '27');

// looping through Map
for (let [key, value] of map) {
    console.log(key + '- ' + value);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript setTimeout() method returns the interval id 
Javascript :: intervals 
Javascript :: JavaScript Data Privacy 
Javascript :: javascript Octal syntax is not allowed 
Javascript :: post css nesting nuxt 
Javascript :: JavaScript Object Prototypes 
Javascript :: react destructuring with rename 
Javascript :: httpclient post raw json body 
Javascript :: jQuery - Dimensions 
Javascript :: code grepper temp email number and password 
Javascript :: single page application example javascript 
Javascript :: manter alguns campos objetos javascript 
Javascript :: Warning: Problem validating app.json: Unable to perform cache refresh for 
Javascript :: connect phantom wallet react typescript 
Javascript :: phaser 60 fps animation test 
Javascript :: phaser reverse animation 
Javascript :: scrolling text animation javascript 
Javascript :: when end sound show alert 
Javascript :: show json preformatted 
Javascript :: how to target a hidden html element by js 
Javascript :: Self Invoking Function ($()) That Can Be Reused 
Javascript :: what are array methods in javascript 
Javascript :: password 
Javascript :: localstorage in next js 
Javascript :: destructuring in javascript 
Javascript :: event.target 
Javascript :: interface in javascript 
Javascript :: create slice redux 
Javascript :: show uploaded image in react/nextjs 
Javascript :: chrome.contextmenus 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =