Skip to content

Tag Archives: JavaScript-Boolean

Below is the example of the Boolean constructor property. Example: <script type = "text/javascript">          var bool = false;         document.write("bool.constructor:"                  + bool.constructor);  </script>      Output: bool.constructor:function Boolean()… Read More
Below is the example of the Boolean prototype Constructor property. Example: <script>         Boolean.prototype.color = function(pro)          {             if (pro == true) {                 return "Green";             } else… Read More
Below is the example of JavaScript Boolean method. Example: <script>      function gfg() {  document.write(Boolean(12));     }      gfg();  </script>  Output: true Boolean is a datatype that returns… Read More
Below is the example of Boolean toString() method. Example: <script>   // Here Boolean object obj    // is created for the value 27   var obj =… Read More
Below is the example of Boolean valueOf() method. Example: <script>   // Here Boolean object obj    // is created for the value 27   var obj =… Read More