Skip to content

Commit f659bf5

Browse files
committed
wip
1 parent 4891f8e commit f659bf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assignments/callbacks.js

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

0 commit comments

Comments
 (0)