boolean boolean(object) : The boolean function converts its argument to a boolean as follows: (1) a number is true if and only if it is neither positive or negative zero nor NaN (2) a node-set is true if and only if it is non-empty (3) a string is true if and only if its length is non-zero (4) an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type