Although there are similar questions on SO, none of them have the answer I need.
In JavaScript, if you execute the following code, the result will be false:
https://i.sstatic.net/c5T8t.png
I understand it has to do with how JavaScript is defined in the spec, but why is it this way? It doesn't seem logical.
If ("string" === "string")
evaluates to true, then why doesn't ({ } === { })
evaluate to true as well?
I read somewhere that the equality algorithm was designed to mimic that of C++ or C#, but it seems like creating a new engine that uses significantly less fuel and not utilizing it just for consistency with other vehicles.
What was the reasoning behind defining JavaScript in this manner? Was there a specific purpose behind this decision, or was it done simply to align with industry standards?