Skip to content

Commit 5124a9b

Browse files
committed
Complete multiplyNums
1 parent 1481cfb commit 5124a9b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

assignments/callbacks.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ sumNums(4, 6, function(sum) {
4848

4949
function multiplyNums(x, y, cb) {
5050
// multiplyNums multiplies two numbers and passes the result to the callback.
51+
return cb(x * y);
5152
}
5253

54+
multiplyNums(6, 7, function(product) {
55+
console.log(product)
56+
})
57+
5358
function contains(item, list, cb) {
5459
// contains checks if an item is present inside of the given array/list.
5560
// Pass true to the callback if it is, otherwise pass false.

0 commit comments

Comments
 (0)