add(server.tests.test2): 添加实验2的内容,将pdf里面标重要的进行提取出来
This commit is contained in:
12
Server/tests/test2/important/unshift.js
Normal file
12
Server/tests/test2/important/unshift.js
Normal file
@@ -0,0 +1,12 @@
|
||||
// let len = array.unshift(element1, ..., elementN);
|
||||
|
||||
const animals = ["pigs"]
|
||||
let rst = animals.unshift("dogs", "cats")
|
||||
console.log(rst)
|
||||
console.log(animals)
|
||||
|
||||
/*
|
||||
# node unshift.js
|
||||
3
|
||||
[ 'dogs', 'cats', 'pigs' ]
|
||||
*/
|
||||
Reference in New Issue
Block a user