• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Boolean

JavaScript 1.1+, ECMAScript 1.0+, JScript 3.0+ Nav3+, NES3+, IE 4+ Syntax

var variable = new Boolean(value)
var variable = Boolean(value)

Description

The Boolean object is a wrapper object that holds a primitive Boolean value, as well as provides a method for converting the value to a string. A primitive boolean can have only one of two states: true or false. Internally, JavaScript uses the number 1 to represent true and 0 to represent false but provides the toString() method to return the strings "true" and "false".


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint