Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Test for "value is null or undefined" is
- **/
- if ( some_variable == null ){
- // some_variable is either null or undefined
- }
- // So these two lines are equivalent:
- if ( typeof(some_variable) !== "undefined" && some_variable !== null ) {}
- if ( some_variable != null ) {}
Add Comment
Please, Sign In to add comment