<html> <body> <script language="javascript"> function function1(){ var bool = new Boolean(true); alert(bool); } </script> <button onclick="function1();">True or false</button> </body> </html>