1
eote 2021-06-01 12:41:18 +08:00
```
for i in list: if conditation: break remove i ``` |
2
renmu123 2021-06-01 12:43:52 +08:00 via Android
indexof splice
|
3
Rocketer 2021-06-01 12:51:11 +08:00 via iPhone 1
函数式编程一般不删,直接 oldArray.filter(i => i.date > someDate),返回一个新数组
|
4
noe132 2021-06-01 13:12:21 +08:00 via Android
arr.splice(0, i)
|
5
remarrexxar 2021-06-01 13:31:09 +08:00
二分查找,然后 splice
|
7
myCupOfTea 2021-06-02 10:46:51 +08:00
oldArray.split(oldArray.findIndex(item => item.date === youDate) + 1 )
|
8
myCupOfTea 2021-06-02 10:47:17 +08:00
oldArray.splice(oldArray.findIndex(item => item.date === youDate) + 1 )
|