Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

178
Vistas
Is `==` still called the "abstract equality operator"?

== used to be called the abstract equality operator, and its abstract equality comparison algorithm was defined in the ECMAScript specification.

This algorithm is now named IsLooselyEqual in the specification, and the term "abstract equality" is no longer used in the specification.

Has the operator been renamed?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You can call == the abstract equality operator because it checks according to the abstract equality comparison algorithm. So, this is a valid, if unofficial, name for it.

The more popular name for this is "loose equality". Also an unofficial name. It is opposed to "strict equality" with ===.


The operator is simply referred to "the equals operator" in ECMAScript 5.

In ECMAScript 6 the specification has an umbrella 12.10 Equality Operators section which groups together ==, !=, ===, and !==. However, parts of the specification do still mention "the equality operator" like 12.10.3 Runtime Semantics: Evaluation which reads the following at the end of the section:

NOTE 2 The equality operators maintain the following invariants:

  • A != B is equivalent to !(A == B).
  • A == B is equivalent to B == A, except in the order of evaluation of A and B.

NOTE 3 The equality operator is not always transitive. For example, there might be two distinct String objects, each representing the same String value; each String object would be considered equal to the String value by the == operator, but the two String objects would not be equal to each other. For example:

  • new String("a") == "a" and "a" == new String("a") are both true.
  • new String("a") == new String("a") is false.

This is still the case in the latest official ECMAScript 12 (2021) specification. The relevant section is 13.11 Equality Operators which still contains ==, !=, ===, and !==. The end of 13.11.1 Runtime Semantics: Evaluation still contains the same notes as ECMAScript 6 did.


Therefore the operator is "the equality operator*. The operation it performs is called the Abstract Equality Comparison in ECMAScript 12 (with an analogous "Strict Equality Comparison" for ===) and recently has been renamed to IsLooselyEqual (with an analogous "IsStrictlyEqual") in the latest (2022) draft.

about 4 years ago · Juan Pablo Isaza Denunciar

0

In ECMAScript 5, the == operator was called the "equals operator", and === was called the "strict equals operator".

In ES2022, the term "equality operators" is used to encompass both (and the word-pairing "equals operator" does not occur).

The term "loose equality operator" does not appear in ES2022, although the algorithm used to define its behavior is called IsLooselyEqual.

The term "strict equality operator" does not appear in ES2022, although the algorithm used to define its behavior is called IsStrictlyEqual.

On this basis, I would say == was never* officially called the "abstract equality operator". It was the "equals operator". However, given that this term is no longer used in the specification, perhaps its name has changed to the "equality operator" or possibly the "loose equality operator" (with the converse being the "strict equality operator").

*need to check prior to ES5

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda