Number constructor Property - Javascript Number

Javascript examples for Number:constructor

Description

In JavaScript, the constructor property returns the constructor function for an object.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="demo"></p>

<script>
var num = 1.5;// w ww  .  j  a va  2 s  .  com
document.getElementById("demo").innerHTML = num.constructor;
</script>

</body>
</html>

Related Tutorials