Edit This Code:
See Result »
<!DOCTYPE html> <html> <body> <p>Display the Boolean value of "":</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = ""; document.getElementById("demo").innerHTML = Boolean(x); } </script> </body> <!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_boolean_empty by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 13 Mar 2016 11:03:04 GMT --> </html>
Result: