The valueOf()
method returns the wrapped primitive value of a Number object.
numObj.valueOf()
None.
This method is usually called internally by JavaScript and not explicitly in web code.
valueOf
var numObj = new Number(10); console.log(typeof numObj); // object var num = numObj.valueOf(); console.log(num); // 10 console.log(typeof num); // number
Created by Mozilla Contributors, license: CC-BY-SA 2.5