Step 11

JavaScript provides a more compact syntax for writing functions, particularly when provided as an argument to other functions.

const cnumber = "4003600000000014";

let arr = cnumber.split('');

arr = arr.reverse();

arr = arr.map(element => parseInt(element));

console.log(arr);

The syntax exhibited above, as we describe before, is known as the "arrow function."

Moreover, we can write the operations performed on the arr one after another, like a pipeline, as shown below:

const cnumber = "4003600000000014";

let arr = cnumber
  .split('')
  .reverse()
  .map(element => parseInt(element));

console.log(arr);