==
and !=
JS-0050109 if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
110 return false;
111 }
112 if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {113 return false;
114 }
115 if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {
106 if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
107 return false;
108 }
109 if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {110 return false;
111 }
112 if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
103 if(e.keyCode == 123) {
104 return false;
105 }
106 if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {107 return false;
108 }
109 if(e.ctrlKey && e.shiftKey && e.keyCode == 'C'.charCodeAt(0)) {
100
101// disable developer mode
102document.onkeydown = function(e) {
103 if(e.keyCode == 123) {104 return false;
105 }
106 if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)) {
112 if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)) {
113 return false;
114 }
115 if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)) {116 return false;
117 }
118}
It is considered good practice to use the type-safe equality operators ===
and !==
instead of their regular counterparts ==
and !=
.
The strict equality operators (===
and !==
) use the strict equality comparison algorithm to compare two operands.
false
.true
only if they refer to the same object.null
or both operands are undefined
, return true
.NaN
, return false
.+0
and -0
are considered to be the same value.true
or both false
.The most notable difference between this operator and the equality (==
) operator is that if the operands are of different types, the ==
operator attempts to convert them to the same type before comparing.
a == b
foo == true
bananas != 1
value == undefined
typeof foo == 'undefined'
'hello' != 'world'
0 == 0
true == true
foo == null
a === b
foo === true
bananas !== 1
value === undefined
typeof foo === 'undefined'
'hello' !== 'world'
0 === 0
true === true
foo === null