Quick Links
JavaScript Boolean is an object that represents value in two states: true or false. You can create the Java Script Boolean object by Boolean() constructor as given below.
The default value of Java Script Boolean object is false.
Boolean Example:
<script>
document.write(10<20);//true
document.write(10<5);//false
</script>
JavaScript Boolean Properties
- constructor : returns the reference of Boolean function that created Boolean object.
- prototype : enables you to add properties and methods in Boolean prototype.
Java Script Boolean Methods
- toSource() : returns the source of Boolean object as a string.
- toString() : converts Boolean into String.
- valueOf() : converts other type into Boolean.
Welcome to JavaScript!
JavaScript in Detail
External JavaScript
Syntax in JavaScript
Comments in JavaScript
Variables in JavaScript
Operators in JavaScript