Javascript: Multiply array elements by a number and store result to a new array
09:53 20 Nov 2025

If I have:

const arr = [1, 2, 3, 4];
const n = 5;
const result = [6, 1, 7, 0]; // 1234 * 5

How do I get result?

javascript