Is there a // operator in JavaScript?
Because in Python we have:
5 // 2.0 # => 2.0
5 / 2.0 # => 2.5
So I tried in JavaScript:
5.0//2.0
and I got 5! What's going on there?
I read that there is no such a thing as a // operator in JavaScript. In this case, why didn't I get an exception or, better, an error from the lexer?
I used this line:
document.write(eval("5.0//2.0"));
In Firefox 3.6.23.