题解 | #求二次方#
求二次方
http://www.nowcoder.com/practice/b7a8647e33d84f5c88acdd7c81a85fdf
function square(arr) {
var temp = [];
arr.forEach(function(elem){
return temp.push(Math.pow(elem,2))
})
return temp
}
求二次方
http://www.nowcoder.com/practice/b7a8647e33d84f5c88acdd7c81a85fdf
function square(arr) {
var temp = [];
arr.forEach(function(elem){
return temp.push(Math.pow(elem,2))
})
return temp
}
相关推荐