Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript for loop over dictionary

var dict = {'a': 1, 'b': 2, 'c' : 3}; 
for([key, val] of Object.entries(dic)) {
  console.log(key, val);
}
 
PREVIOUS NEXT
Tagged: #javascript #loop #dictionary
ADD COMMENT
Topic
Name
1+3 =