add(server.tests.test2): 添加实验2的内容,将pdf里面标重要的进行提取出来

This commit is contained in:
2025-11-10 22:37:29 +08:00
parent 7b557d2c64
commit 491489686d
10 changed files with 257 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// splice(start)
// splice(start, deleteCount)
// splice(start, deleteCount, item1, ...)
const datas = ["aa", "bb", "cc"];
console.log(datas.splice(1))
console.log(datas)
console.log(datas.splice(1, 1))
console.log(datas)
console.log(datas.splice(1, 0, "xx", "yy"))
console.log(datas)
console.log(datas.splice(1, 1, "xx"))
console.log(datas)
/*
# node splice.js
[ 'bb', 'cc' ]
[ 'aa' ]
[]
[ 'aa' ]
[]
[ 'aa', 'xx', 'yy' ]
[ 'xx' ]
[ 'aa', 'xx', 'yy' ]
*/