es6 快速刪除 list 中的一個項
let arr = [
{id:1,value:2},
{id:2,value:3},
.......
]
arr = arr.filter(({ id }) => id !== 8);
let arr = [
{id:1,value:2},
{id:2,value:3},
.......
]
arr = arr.filter(({ id }) => id !== 8);