From 6b472aa91b93f00cc3406dabf19d21613d9d0b09 Mon Sep 17 00:00:00 2001 From: Tyler Lawson Date: Thu, 18 Feb 2021 23:16:36 -0500 Subject: [PATCH] 7 done --- 07 - Array Cardio Day 2/index-START.html | 81 ++++++++++++++---------- 1 file changed, 48 insertions(+), 33 deletions(-) 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 @@ - - - Array Cardio 💪💪 - - -

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); + + -- knotmirror 0.0.1