Number.valueOf valueOf — Returns the primitive value of a Number object. Description Number.valueOf() Examples Example #1 – valueOf example Runvar n = new Number(4242); console.log(typeof n.valueOf()); // Will return "number". console.log(n.valueOf()); // Will be the numeric value: 4242 External references Mozilla: Number.valueOf method