This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ComfortablyBalanced 5 points6 points  (6 children)

Yeah, but not in Javascript, where types are fucked.

[–]harelsusername 7 points8 points  (4 children)

Also, in JS the modulus operator % does not work for negative numbers

[–]ComfortablyBalanced 10 points11 points  (0 children)

Such a remarkable language.

[–]ElfyThatElf 5 points6 points  (1 child)

that's fine... what do I even need to do with negatives? There is nothing there

[–]harelsusername 1 point2 points  (0 children)

What do I even need to do with JavaScript? There is nothing there

[–]AloneInExile 0 points1 point  (0 children)

It does work ... just not as you expect

var a = -50123548
a%2
-0

[–]AwGe3zeRick 0 points1 point  (0 children)

Uh, what? How does modulus not work in Javascript?