Skip to content

Commit 0672766

Browse files
committedJul 5, 2023
Remove void in a single place
1 parent ac75f79 commit 0672766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎JavaScript/5-void.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const f = ({ a, b }, callback) => {
44
if (a < 0) return void callback(0);
55
if (b > 9) return void callback(100);
66
if (a === b) return void callback(-1);
7-
void callback(b - a);
7+
callback(b - a);
88
};
99

1010
f({ a: 5, b: 7 }, (res) => {

0 commit comments

Comments
 (0)
Please sign in to comment.