Javascript Boolean Object
A JavaScript Boolean object can represent two values “true” or “false”. How to create a Javascript boolean object: 1. By using boolean literals. 2. By using Boolean() constructor. Syntax: Var b1 = true; var b2 = new Boolean(value); Example: <!DOCTYPE html> <html> <body> <script> var boolean1=new Boolean(true); var boolean2=new Boolean(false); var boolean3=true; document.write(“Boolean1: “+boolean1+ “</br>”); … Read more