Код: Выделить всё
const arr = [1, 2, 3, 4];
const n = 5;
const result = [6, 1, 7, 0]; // 1234 * 5
Подробнее здесь: https://stackoverflow.com/questions/798 ... -new-array
Код: Выделить всё
const arr = [1, 2, 3, 4];
const n = 5;
const result = [6, 1, 7, 0]; // 1234 * 5