let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
arr.forEach((val,index,arry) => {
    arry[index] = val * 2
})

console.log(arr); // [2,4,6,8,10,12,14,16,18,20]

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.