contents   index   previous   next



Boolean()

syntax:

new Boolean(value)

where:

value - a value to be converted to a boolean.

 

return:

object - a Boolean object with the parameter value converted to a boolean value.

 

description:

This function creates a Boolean object that has the parameter value converted to a boolean value. If the function is called without the new constructor, then the return is simply the parameter value converted to a boolean.

 

see:

Boolean toString()

 

example:

var name = "Joe";

var b = new Boolean( name == "Joe" );

// The Boolean object "b" is now true.

 


Boolean.toString()