<html>
<body>
<p id="demo">Click the button to convert different object values to their numbers.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var test1 = new Boolean(true);
var test2 = new Boolean(false);
var test3 = new Date();
var test4 = new String("999");
var test5 = new String("999 888");
var n = Number(test1) + "<br>" + Number(test2) + "<br>" + Number(test3) + "<br>" + Number(test4) + "<br>" + Number(test5);
document.getElementById("demo").innerHTML=n;
}
</script>
</body>
</html>