Tuesday, September 11, 2018

js is null check

We can check null by ===
if ( value === null ){

}
Just by using if
if( value ) {

}
will evaluate to true if value is not:
  • null
  • undefined
  • NaN
  • empty string ("")
  • false
  • 0

No comments: