Pages

Thursday, October 14, 2010

JavaScript -=- Verify if a variable is NULL, undefined or empty

Hi!

To verify if a variable is null, undefined or empty in ExtJS, you could use
Ext.isEmptyMixed value, [Boolean allowBlank] ) : Boolean

Returns true if the passed value is null, undefined or an empty string (optional).
Parameters:
  • value : Mixed
    The value to test
  • allowBlank : Boolean
    (optional) Pass true if an empty string is not considered empty
Returns:
  • Boolean

No comments:

Post a Comment