Skip to content

Commit 593e7f0

Browse files
committed
better notes
1 parent 7c951ac commit 593e7f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

assignments/callbacks.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ const items = ['Pencil', 'Notebook', 'yo-yo', 'Gum'];
2525
2626
// TEST 1 (inlined callback):
2727
28-
firstItem(items, item => console.log(`I love my ${item}!`));
29-
// "I love my Pencil!"
28+
const test1 = firstItem(items, item => console.log(`I love my ${item}!`));
29+
console.log(test1); // "I love my Pencil!"
3030
3131
// TEST 2 (declaring callback before hand):
3232
3333
function logExorbitantPrice(article) {
3434
console.log(`this ${article} is worth a million dollars!`);
3535
};
3636
37-
firstItem(items, logExorbitantPrice);
38-
// "this Pencil is worth a million dollars!"
37+
const test2 = firstItem(items, logExorbitantPrice);
38+
console.log(test2); // "this Pencil is worth a million dollars!"
3939
*/
4040

4141

0 commit comments

Comments
 (0)