4 ms·
> the behavior has always been The ECMA spec only defines Javascript 1.3 and above. See this description for logical operators for Javascript 1.1: https://web.
by timoxley 9y ago
> the behavior has always been
The ECMA spec only defines Javascript 1.3 and above. See this description for logical operators for Javascript 1.1: https://web.archive.org/web/20060318153542/wp.netscape.com/eng/mozilla/3.0/handbook/javascript/index.html https://web.archive.org/web/20060318153542/wp.netscape.com/e...
- arghwhat 9y agoECMA-262 defines ECMAScript. "JavaScript 1.3" refers to a Netscape-specific language implementation ("Mocha", "LiveScript", "JavaScript"), with version 1.3 being based partially based on ECMA-262 Second Edition. Some of it might still live on in Firefox, but it is certainly not what people refer to as "JavaScript". Doing some research, it appears that Netscape changed the logical operator behavior in version 1.2 (https://web.archive.org/web/19981202065738if_/http://developer.netscape.com:80/docs/manuals/communicator/jsref/ops.htm#1044813 https://web.archive.org/web/19981202065738if_/http://develop...). However, they did not highlight this change at all (https://web.archive.org/web/19970630092641fw_/http://developer.netscape.com:80/library/documentation/communicator/jsguide/intro.htm#introduction https://web.archive.org/web/19970630092641fw_/http://develop...), so I suspect it was just a minor cleanup, potentially related to the equality operator change. As a side-note: Netscape scripting was awful. This was how you casted an object to a Number: Number(x) = x;