Javascript: arrow functions

Example:

let numbers = [1, 2, 3, 4, 5];
JavaScript arrow functions provide a shorthand syntax for writing functions.

Solution:

let squared = numbers.map(x => x * x);

Beginner's Guide to JavaScript