Skip to content

Commit 7c35830

Browse files
committed
extra notes on the callbacks example
1 parent 2bf6594 commit 7c35830

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assignments/callbacks.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const items = ['Pencil', 'Notebook', 'yo-yo', 'Gum'];
44

55
/*
66
7-
// GIVEN THIS PROBLEM (and the `items` array):
7+
// GIVEN THIS PROBLEM:
88
99
function firstItem(arr, cb) {
1010
// firstItem passes the first item of the given array to the callback function.
@@ -19,8 +19,8 @@ const items = ['Pencil', 'Notebook', 'yo-yo', 'Gum'];
1919
// NOTES ON THE SOLUTION:
2020
2121
// firstItem is a higher order function
22-
// that uses a callback (referred to as 'cb') as its second argument.
23-
// To test our solution, we will try it with a variety of callbacks.
22+
// that uses a callback (referred to as `cb`) as its second argument.
23+
// To test our solution, we will use the given `items` array and a variety of callbacks.
2424
// Note how callbacks can be declared separately, or inlined.
2525
2626
// TEST 1 (inlined callback):

0 commit comments

Comments
 (0)