<script language="JavaScript"> var obj1 = new Boolean(false); var obj2 = new Boolean(1); document.write( obj1.valueOf() + '<br />' ); document.write( obj2.valueOf() ); </script>
运行该例子,输出:
false true
0