I have this jQuery code
if (date != !date) {
console.log(date);
}
The date
is an array, or null
. If it's an array, I want to log it, if it is null
I want to stop it right there. I thought the != !var
was exactly for this purpose. Still when I try this, I do also get null
console logs. How come?