Skip to content

Commit 1481cfb

Browse files
committed
Complete sumNums
1 parent c8eda36 commit 1481cfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assignments/callbacks.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ last(items, function(last) {
4040

4141
function sumNums(x, y, cb) {
4242
// sumNums adds two numbers (x, y) and passes the result to the callback.
43+
return cb(x + y);
4344
}
45+
sumNums(4, 6, function(sum) {
46+
console.log(sum);
47+
})
4448

4549
function multiplyNums(x, y, cb) {
4650
// multiplyNums multiplies two numbers and passes the result to the callback.

0 commit comments

Comments
 (0)