Skip to content

Commit 3edaf8b

Browse files
committed
Return from wrapped callback
1 parent 5bcc229 commit 3edaf8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

JavaScript/3-callback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const wrapFunction = fn => {
1010
if (typeof callback === 'function') {
1111
args[args.length - 1] = (...args) => {
1212
console.log('Callback:', fn.name);
13-
callback(...args);
13+
return callback(...args);
1414
};
1515
}
1616
}

0 commit comments

Comments
 (0)