A friend asked me this question he got during a job interview
function canbetrue(x) {
return x != x;
}
Which value of param
will make the above function return true ?
console.log(canbetrue(param));
A friend asked me this question he got during a job interview
function canbetrue(x) {
return x != x;
}
Which value of param
will make the above function return true ?
console.log(canbetrue(param));
NaN is what you are looking for...
function canbetrue(x) {
return x != x;
}
console.log(canbetrue(NaN));