diff --git a/07 - Array Cardio Day 2/index-START.html b/07 - Array Cardio Day 2/index-START.html index 969566f..1b36a60 100644 --- a/07 - Array Cardio Day 2/index-START.html +++ b/07 - Array Cardio Day 2/index-START.html @@ -1,41 +1,56 @@ -
- -Psst: have a look at the JavaScript Console 💁
- - + // Array.prototype.findIndex() + // Find the comment with this ID + // delete the comment with the ID of 823423 + console.log("Table before"); + console.table(comments); + const toDelete = comments.findIndex((com) => com.id === 823423); + comments.splice(toDelete, 1); + console.log("Table after"); + console.table(comments); + +