In ActionScript 3, you can check if a value exists like this:
if (object) {
trace("This object is not null, undefined, or empty!")
}
I frequently use this as a shorthand for if (object != null)
Is there a proper term for evaluating objects for null in this fashion? I suppose it's a matter of the Boolean typecasting rules for the language but I'm not sure if there's a name for the resulting syntax.
list of falsy values (non truthy)
regularly for checking if a variable is null you may use :
(a == null)
this statement returns true if a is null, But also return true for all of the above list, because they'r all falsy values and(a == undefined)
returns true, even a is not undefined but null or 0 or false.so you should use Identity operator in this case. following evaluations just returns true when a is null