Answers for "init list iterate for map js"

0

iteratea on values map js

map.values((value) => /* do whatever with value */)
Posted by: Guest on January-02-2021
1

use map to loop through an array

let squares = [1,2,3,4].map(function (val) {  
    return val * val;  
}); 
// squares will be equal to [1, 4, 9, 16]
Posted by: Guest on November-20-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language