We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5672dd commit e0f547bCopy full SHA for e0f547b
1 file changed
07 - Array Cardio Day 2/index-START.html
@@ -26,15 +26,19 @@
26
27
// Some and Every Checks
28
// Array.prototype.some() // is at least one person 19?
29
+ people.some(p => new Date().getFullYear() - p.year === 19)
30
// Array.prototype.every() // is everyone 19?
31
+ people.every(p => new Date().getFullYear() - p.year === 19)
32
33
// Array.prototype.find()
34
// Find is like filter, but instead returns just the one you are looking for
35
// find the comment with the ID of 823423
36
+ comments.find(c => c.id === 823423)
37
38
// Array.prototype.findIndex()
39
// Find the comment with this ID
40
// delete the comment with the ID of 823423
41
+ comments.splice(comments.findIndex(c => c.id === 823423), 1)
42
43
</script>
44
</body>
0 commit comments