Skip to content

Commit b268789

Browse files
author
Gill Abada
committed
complete problem 4 on callbacks.js.
1 parent 065ef2e commit b268789

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
@@ -50,8 +50,13 @@ sumNums(505, 505, function(result) {
5050

5151
function multiplyNums(x, y, cb) {
5252
// multiplyNums multiplies two numbers and passes the result to the callback.
53+
return cb(x*y);
5354
}
5455

56+
multiplyNums(3, 10, function(result){
57+
console.log(result);
58+
});
59+
5560
function contains(item, list, cb) {
5661
// contains checks if an item is present inside of the given array/list.
5762
// Pass true to the callback if it is, otherwise pass false.

0 commit comments

Comments
 (0)