Very often we check our objects if they are not null and not undefined. I always use condition if (obj !== null && obj !== undefined)
. Few days ago my colleague shown me the syntax of double inversion !!
and now I can use condition if (!!obj)
. This syntax is less.
I'm not a person who are only learning js, but I have a little interest.
So is there any difference between these two ways of object validation? Performance difference? Semantic difference? Any difference?