题解 | #求二次方#
求二次方
http://www.nowcoder.com/practice/b7a8647e33d84f5c88acdd7c81a85fdf
function square(arr) {
// 简洁即是优雅
return arr.map(x => x*x)
// 还可以这样↓(只不过牛客网的JS版本低,不支持这种语法)
// return arr.map(x => x**2)
}
求二次方
http://www.nowcoder.com/practice/b7a8647e33d84f5c88acdd7c81a85fdf
function square(arr) {
// 简洁即是优雅
return arr.map(x => x*x)
// 还可以这样↓(只不过牛客网的JS版本低,不支持这种语法)
// return arr.map(x => x**2)
}
相关推荐
程序员小白条:简历写的有点太多了,一般两页是实习经历比较多的情况下,要么自己有一些有影响力的开源项目,如果你走软件,硬件没必要实习,学校安排总是没区分度的,央国企最好有中大厂实习,另外学历比较重要,不是都要求硕士的,技术会比互联网要求低一些