valueOfbeginner// Retrieve the primitive numeric value
const n = new Number(42)
n.valueOf() // β 42
typeof n.valueOf() // β 'number'Use valueOf() on a Number object to extract the underlying primitive number value, which JavaScript also calls automatically in numeric expressions.
Calling valueOf() on a primitive number returns the number itself (autoboxing handles the call).