Skip to content

Commit 90ab5c1

Browse files
committed
completed multiplyNums function
1 parent 1938b24 commit 90ab5c1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

assignments/callbacks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@ sumNums(122, 9, result => console.log(result));
4747

4848
function multiplyNums(x, y, cb) {
4949
// multiplyNums multiplies two numbers and passes the result to the callback.
50+
const product = x * y;
51+
return cb(product);
5052
}
5153

54+
multiplyNums(10, 9, result => console.log(result));
55+
5256
function contains(item, list, cb) {
5357
// contains checks if an item is present inside of the given array/list.
5458
// Pass true to the callback if it is, otherwise pass false.

0 commit comments

Comments
 (0)