javascript - what are the consequences of using === in pre javascript1.3? -
the strict equal
operator appeared in javascript1.3 , ecmascript 3rd edition.
the oldest browser have ie6, implements 1.3. don't have practical way test outcome of ===
on browsers.
if use ===
happen javascript1.2 browsers?
and still exist today point should care?
edit 1: people suggesting should test <script language="javascript1.2">
. well, not work that.
i executed on modern firefox , chrome:
<script language="javascript1.2"> alert( "1" === 1 ); </script>
and returned false
. absolutely not happend on javascript1.2 (it either syntax error or true
).
you really, shouldn't care them. we're talking version of netscape 4, released on 1997 , no 1 it's using anymore. , honestly, if have write code compatible such browsers, have bigger issues strict equal operator.
so, unless have real use case – , hope you haven't – wouldn't care. threat such browsers "no javascript enabled" browser, display them pure text version of website or warning message upgrade browser.
Comments
Post a Comment