题解 | #求二次方#
求二次方
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)
}
相关推荐
在打卡的大老虎很想潜...:你在找实习,没啥实习经历,技术栈放前面,项目多就分两页写,太紧凑了,项目你最多写两个,讲清楚就行,项目背景。用到的技术栈、亮点、难点如何解决,人工智能进面太难了,需求少。你可以加最新大模型的东西