3 ms·
No one does that any more. if(my_var != null) { }
by Touche 13y ago
No one does that any more.
if(my_var != null) {
}
- snarkyturtle 13y agoOr they just use lodash/underscore which takes care of it for you.
- Touche 13y agoUsing a library to avoid typing !=null seems like overkill.
- snarkyturtle 13y agoIt's more for handling all those js quirks with equality, though yeah if it's your var, you'll probably be fine with != null (though jshint probably won't like it)