Write a function that takes an array of numbers and adds 10 to every element of the array using the forEach( ) method and returns a new array.
const anotherArr = [ 12, 11, 12, 13, 14 ]
let addToArr = []
anotherArr.forEach(num => {
addToArr.push(num + 10)
})
console.log(addToArr)
//Logs [ 22, 21, 22, 23, 24 ]