Possible Duplicate:
What is the !! (not not) operator in JavaScript?
I just came across the code that uses !!
, which means logical not not to me.
app.isArray = Array.isArray || function(object) {
return !!(object && object.concat
&& object.unshift && !object.callee);
};
What is the different between using !!
and not using it?
(my guess is !!
will convert the result to Boolean type. if my guess is correct, why is it so?)