JavaScript Boolean Object
The Boolean object is used to
convert a non-Boolean value to a Boolean value (true or false).
Examples
Check Boolean value
Check if a Boolean object is true or false.
Complete Boolean Object Reference
For a complete reference of all the properties and methods that can be used with
the Boolean object, go to our
complete Boolean object reference.
The reference contains a brief description and examples of use for each
property and method!
Boolean Object
The Boolean object is an object wrapper for a Boolean value.
The Boolean object is used to
convert a non-Boolean value to a Boolean value (true or false).
We define a Boolean object with the new keyword. The following code line
defines a Boolean object called myBoolean:
var myBoolean=new Boolean()
|
Note: If the Boolean object has no initial value or if it is 0, -0, null, "", false,
undefined,
or NaN, the object is set to false. Otherwise it is true (even with the string
"false")!
All the following lines of code create Boolean objects with an initial value
of false:
var myBoolean=new Boolean()
var myBoolean=new Boolean(0)
var myBoolean=new Boolean(null)
var myBoolean=new Boolean("")
var myBoolean=new Boolean(false)
var myBoolean=new Boolean(NaN)
|
And all the following lines of code create Boolean objects with an initial value
of true:
var myBoolean=new Boolean(true)
var myBoolean=new Boolean("true")
var myBoolean=new Boolean("false")
var myBoolean=new Boolean("Richard")
|
What do you want your Web site to do?

What do you want your Web site to do? Ektron CMS400.NET lets you do everything you need to do on the Web and do everything you want to do.
Ektron CMS400.NET gives you all the features you would expect from an
enterprise CMS, but also high-demand functionality like real-time Web
site analytics, community building, blogging, personalization, and
online calendars. Ektron CMS400.NET bridges your Web site gaps.
Use Ektron CMS400.NET for:
- Content & Document Management - Author/edit content, manage navigation, menus, audit trails, workflow, approvals
- Personalzation & Portal Support - Allow visitors to create their own view of your web page
- 508 & W3C Compliance Checker - Ensure compliance with scheduled or on-demand compliance reports
- Memberships - Build online communties with blogs and forums, enable email web alerts, build polls and surveys
- Web Site Analytics - track visitors, report on most requested pages, see where they came from and where they are going
- HTML Form Engine - Create a two-way dialog with visitors using our wizard-like HTML form-building engine with validation and database support
- Multilingual Support - Integrated translation tools help you reach multiple audiences by speaking their language
- Online Calendars - Build and manage Web-based calendars and enable users to customize a view based on what’s important to them
See why there are 15,000+ Ektron integrations worldwide.
Click here to learn more, then request a live online demo or download a FREE TRIAL
|