首页 > 试题广场 >

下列程序的运行结果是什么?function add

[单选题]
下列程序的运行结果是什么?
function addToList(item, list) {
return list.push(item)
}
const result = addToList("nowcoder", ["hello"])
console.log(result)
  • [‘hello’, ‘nowcoder’]
  • 2
  • true
  • undefined
fruits.push(...)返回新数组的长度
发表于 2021-06-23 16:55:30 回复(1)