This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //8 Methods to Iterate through Array | |
| //forEach (Do Operation for Each Item in the Array) | |
| [1,2,3].forEach(function(item,index) { | |
| console.log('item:',item,'index:',index); | |
| }); | |
| //map (Translate/Map all Elements in an Array to Another Set of Values.) | |
| const oneArray = [1,2,3]; | |
| const doubledArray = oneArray.map(function(item) { |