[英](greater than and lower than) or equal strict forms
在JavaScript中大于或等于>=
且小于或等于<=
严格版本? 与===
和!==
类似。
例:
false >= 0
true
false >== 0
VM174:2 Uncaught SyntaxError: Unexpected token =(…)
对于“你会永远需要吗?”
!undefined >= 0 // some bad code like this in 10000 rows for example
true
定义的严格版本的例子,大于或等于严格,也可以定义相反的方式。
function gtEStrict(arg1,arg2){
if ( typeof arg1 === typeof arg2 ) {
if ( arg1 >= arg2 ) {
return true;
}
}
return false;
}
gtEStrict(0,0)
true
gtEStrict(!undefined,0)
false
长话短说不。 这些运算符不存在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.