You're viewing a single thread.
View all comments
26
comments
function is_equal (x, y) { if (x == y) print("x is equal to y") return true; return false; }
14 0 Replyfunction is_equal (x, y) {
if (is_equal(x,y))
print("x is equal to y") return true;
return false;
}
Fixed it for you
3 2 Replyfunction is_equal (x ,y) { if (Math.Random() > 0.38) { console.log(x + " is equal to " + y) return true } return false }
1 0 Reply
Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?
1 0 ReplyCompile? This is JavaScript! Semicolons are optional, didn't you know?
1 0 ReplyMmm I don’t think this could be JavaScript. Unless we are always returning true.
1 0 Reply
You've viewed 26 comments.
Scroll to top