function square(arr) { var newarr = [] arr.forEach(function(item){ newarr.push(Math.pow(item,2)) }) return(newarr) }