Skip to content

Commit d57a890

Browse files
Fixed some syntax errors
Signed-off-by: Moulik Aggarwal <[email protected]>
1 parent 48eb4ab commit d57a890

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
function isEven(x){
2-
if(x % 2 == 0) console.log(`${x} is even`)
3-
else console.log(`${x} is odd`)
2+
if(x = 2 || x % 2 == 0){
3+
console.log(`${x} is even`)
4+
} else
5+
console.log(`${x} is odd`)
46
}
57

68
function isNumber(num){

0 commit comments

Comments
 (0)