I know that below are the two ways in JavaScript to check whether a variable is not null, but I’m confused which is the best practice to use.
null
Should I do:
if (myVar) {...}
or
if (myVar !== null) {...}