“==="的名字是什么?JavaScript 中的运算符 [英] What is the name of "===" operator in JavaScript
问题描述
我想知道 ===
运算符是否有广泛认可的名称.类似于 (function () {})();
I was wondering if there is widely recognized name for ===
operator. Something like "IIFE" for (function () {})();
推荐答案
我想知道 === 运算符是否有广泛认可的名称.
I was wondering if there is widely recognized name for === operator.
我最常听到的名字是严格相等运算符和严格相等运算符.事实证明,可以说,它同时具有这两个名称:
The names I've heard most commonly are strict equality operator and strict equals operator. And it turns out that arguably, it has both those names:
旧规范将其称为严格等于运算符:
The old spec called it the strict equals operator:
11.9.4 严格等于运算符 ( === )
11.9.4 The Strict Equals Operator ( === )
产生式 EqualityExpression : EqualityExpression === RelationalExpression 的计算方式如下: ...
The production EqualityExpression : EqualityExpression === RelationalExpression is evaluated as follows: ...
奇怪的是,它实际上从未在新规范中命名,但最接近的是 这里:
Oddly, it's never actually named in the new spec, but the closest is here:
7.2.13 严格相等比较
7.2.13 Strict Equality Comparison
比较 x === y,其中 x 和 y 是值,产生真或假.这样的比较执行如下:...
The comparison x === y, where x and y are values, produces true or false. Such a comparison is performed as follows:...
这篇关于“==="的名字是什么?JavaScript 中的运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!