функция с .map JavaScript

const numbers = [2, 7, 9, 171, 52, 33, 14]
const toSquare = num => num * num

const squareNums = newNumbers => 
  newNumbers.map(toSquare);

console.log(squareNums(numbers));
SzilStone