function to map through numbers in javascript code example
Example 1: js map function
const exampleArray = ['aa','bbc','ccdd'];
console.log(exampleArray.map(a => a.length));
//Would print out [2,3,4]
Example 2: map method
var yourArray= yourArray.map(Number);