Contact: aviboots(AT)netvision.net.il
39,851 questions
51,772 answers
573 users
const arr = [1, 2, 3, 4, 5]; var squaresES5 = arr.map(function(x) { return x * x }); console.log(squaresES5); const squaresES6 = arr.map(x => x * x); console.log(squaresES6); /* run: [ 1, 4, 9, 16, 25 ] [ 1, 4, 9, 16, 25 ] */