You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ All of these examples are from FreeCodeCamp's [course](https://www.freecodecamp.
19
19
-[6. Confirm the Ending Passed](#6-confirm-the-ending-passed)
20
20
-[7. Repeat a String Repeat a String](#7-repeat-a-string-repeat-a-string)
21
21
-[8. Truncate a String](#8-truncate-a-string)
22
+
-[9. Finders Keepers](#9-finders-keepers)
22
23
23
24
## Basic Algorithm Scripting
24
25
@@ -284,3 +285,36 @@ function truncateString(str, num) {
284
285
285
286
truncateString("A-tisket a-tasket A green and yellow basket", 8);
286
287
```
288
+
289
+
### 9. Finders Keepers
290
+
291
+
_Difficulty: Beginner_
292
+
293
+
Create a function that looks through an array arr and returns the first element in it that passes a 'truth test'. This means that given an element x, the 'truth test' is passed if func(x) is true. If no element passes the test, return undefined.
0 commit comments