6

In which year was the triple equals sign introduced to JavaScript?

Bonus points for

==

===

Object.is

and any equality checks that I am missing.

Ryan Leach
  • 4,262
  • 5
  • 34
  • 71
  • 4
    This is really what documentation and specifications are for. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Specifications, `===` was added in [ECMAScript 3rd Edition (ECMA-262)](https://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf), December 1999 – Phil Nov 02 '18 at 00:29
  • 5
    It's not "too broad", no, it's just not a terribly useful question and you could have researched it yourself. – deceze Nov 02 '18 at 00:31
  • @deceze I was having difficulty finding it on Stack Overflow, (and other places) Yes it may have been a little hasty, but there's been other questions similar to this in the past that have been recieved well, and poorly. Posting a question to SO doesn't mean that I wasn't willing to put the effort into answering it myself, once pushed a little in the right direction, and I don't believe downvotes should be used in cases of 'lack of research effort' if it's still a **relevant** question for the site that doesn't have a duplicate. The real question lies, is it **relevent**? – Ryan Leach Nov 02 '18 at 00:44
  • 2
    Exactly, a) it seems pretty *irrelevant* to any working Javascript programmer (you can't even really get Javascript versions which don't support `===`) and b) Stack Overflow doesn't necessarily need to be a copy of existing documentation. – deceze Nov 02 '18 at 00:50
  • 2
    Personally the reason I went hunting for it originally, was to find a summary that didn't require trawling through several standards, and potentially pre-standards. I feel like it's a nice single data point for showing the evolution of the language to other people. – Ryan Leach Nov 02 '18 at 00:54
  • 2
    Up-voted! Good question. The inception date of `===` into the specification is a [pertinent curiosity](https://stackoverflow.com/questions/59813590/). – Lonnie Best Jan 20 '20 at 12:34

1 Answers1

13

According to the ECMA Standards, as found on: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Specifications


Object.is - June 2015

Object.is was introduced in Standard ECMA-262 6th Edition / June 2015


=== - December 1999

=== was introduced in the 3rd edition of ECMAScript, aka JavaScript 1.3.

ECMAScript 3rd Edition (ECMA-262) Standard

Adds === and !== operators.

Implemented in JavaScript 1.3 which is dated December 1999 on Standard ECMA-262 3rd Edition


== - June 1997

I suspect == predates ECMAScript standards, but the closest standard i can find is

Standard ECMA-262 June 1997 aka JavaScript 1.0

However, this is merely the date they were standardized, if they existed pre-standardization, the dates may be incorrect.

Ryan Leach
  • 4,262
  • 5
  • 34
  • 71
  • 1
    I found some standards from 1996 [here](http://www.ecma-international.org/archive/ecmascript/1996/index.html), predating ES1, that already include `==`. – Bergi Jan 19 '20 at 20:11