let arr1 = [1,2,3,4,5];

function square(n) {
return n*n;
}

let arr2 = arr1.map(square);

console.log(arr2);

// do a control+R everytime, or u see that variable is already defined!!!