I want to remove all element
have value isDone === true
in array list
. But i don't known remove all , I just remove each item one.
This is my code:
clearCompleted: function (list) {
for (var i = 0; i < list.length; i++) {
if (list[i].isDone === true) {
list.splice(i, 1);
}
}
},
Please help me resolve it.