Skip to content

Commit 28e1f38

Browse files
author
mjdude
committed
completed array cardio 2
1 parent 94ebcf8 commit 28e1f38

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

07 - Array Cardio Day 2/index-START.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@
5757
// Find the comment with this ID
5858
// delete the comment with the ID of 823423
5959

60+
const index = comments.findIndex((comment) => {
61+
return comment.id === 823423;
62+
});
63+
64+
const removeComment = comments.splice(index, 1);
65+
66+
console.log(
67+
`Find the comment with this ID
68+
delete the comment with the ID of 823423`
69+
);
70+
71+
console.log(removeComment);
72+
6073
</script>
6174
</body>
6275
</html>

0 commit comments

Comments
 (0)