Question

the Strict equal operator only appeared in Javascript1.3 and ECMAscript 3rd edition.

the oldest browser i have is IE6, which implements 1.3. So I don't have any practical way to test the outcome of === on those browsers.

if I use === what will happen to javascript1.2 browsers?

and do they still exist today to the point I should care?

Edit 1: people are suggesting i should just test with <script language="JavaScript1.2">. Well, it does not work like that.

I executed this on modern Firefox and Chrome:

<script language="JavaScript1.2">
    alert( "1" === 1 );
</script>

and it simply returned False. which is absolutely not what would happend on javascript1.2 (it will be either syntax error or True).

Was it helpful?

Solution

You really, really shouldn't care about them. We're talking about the early version of Netscape 4, that was released on 1997 and no one it's using anymore. And honestly, if you will have to write code that is compatible with such browsers, you have bigger issues than the strict equal operator.

So, unless you have a real use case – and I really hope for you that you haven't – I wouldn't care. I will likely threat such browsers as "No JavaScript Enabled" browser, display them a pure text version of the website or a warning message to upgrade their browser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top