We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7af96b5 commit d664c48Copy full SHA for d664c48
1 file changed
07 - Array Cardio Day 2/index-START.html
@@ -36,12 +36,14 @@
36
// Array.prototype.find()
37
// Find is like filter, but instead returns just the one you are looking for
38
// find the comment with the ID of 823423
39
+ console.table(comments.find((it) => it.id == 823423))
40
-
41
// Array.prototype.findIndex()
42
// Find the comment with this ID
43
// delete the comment with the ID of 823423
44
+ let index = comments.findIndex((it) => it.id == 823423)
45
+ comments.splice(index, 1)
46
+ console.table(comments)
47
</script>
48
</body>
49
</html>
0 commit comments