Given an array of nested arrays and a number (n), return a new array that is flattened and each number is multiplied by n.
// input:
const a = [[1, 2], [3, 4], [5, 6]], n = 2
// output:
[2, 4, 6, 8, 10, 12]
(Ctrl + ')
Loading...
/* output */
Next(Ctrl + y)