I\'m trying to square each number in an array and my original code didn\'t work. I looked up another way to do it, but I\'d like to know WHY the original code didn\'t work.<
let arr = [1, 2, 3]; let mapped = arr.map(x => Math.pow(x, 2)); console.log(mapped);