𝔻𝔼𝕍𝕀𝕃𝕀𝕊ℍ@lemmy.world to Programmer Humor@programming.dev · 2 years agoI need this....lemmy.worldimagemessage-square14fedilinkarrow-up110arrow-down11
arrow-up19arrow-down1imageI need this....lemmy.world𝔻𝔼𝕍𝕀𝕃𝕀𝕊ℍ@lemmy.world to Programmer Humor@programming.dev · 2 years agomessage-square14fedilink
minus-squaregandalf_der_12te@feddit.delinkfedilinkarrow-up0·2 years agofunction is_equal (x, y) { if (x == y) print("x is equal to y") return true; return false; }
minus-squareKairuByte@lemmy.dbzer0.comlinkfedilinkarrow-up0·edit-22 years agoWouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?
minus-squareZiglin (it/they)@lemmy.worldlinkfedilinkarrow-up1·2 years agoCompile? This is JavaScript! Semicolons are optional, didn’t you know?
minus-squareKairuByte@lemmy.dbzer0.comlinkfedilinkarrow-up1·2 years agoMmm I don’t think this could be JavaScript. Unless we are always returning true.
function is_equal (x, y) { if (x == y) print("x is equal to y") return true; return false; }
Wouldn’t this fail to compile due to the missing semicolon, and if that is corrected only ever return true?
Compile? This is JavaScript! Semicolons are optional, didn’t you know?
Mmm I don’t think this could be JavaScript. Unless we are always returning true.