Minggu, 30 September 2012

JavaScript Boolean Object

Complete Boolean Object Reference

For a complete reference of all the properties and methods that can be used with the Boolean object.
The reference contains a brief description and examples of use for each property and method!

Create a Boolean Object

The Boolean object represents two values: "true" or "false".
The following code creates a Boolean object called myBoolean:


If the Boolean object has no initial value, or if the passed value is one of the following:
  • 0
  • -0
  • null
  • ""
  • false
  • undefined
  • NaN
the object is set to false. For any other value it is set to true (even with the string "false")!

0 komentar:

Posting Komentar