Codeconst arr = [1, 2, 3];const result = arr.reduce((acc, num) => { acc.push(num * 2); return acc;}, []);console.log(result);