JS Built-ins
BigIntvalueOfbeginner

BigInt.prototype.valueOf() β€” returns self

πŸ“– Usage Example
const b = Object(42n)
b.valueOf()  // β†’ 42n

valueOf() returns the underlying primitive BigInt from a BigInt wrapper object.

BigInt valueOf()

(1n).valueOf() returns the primitive BigInt value 1n.

Challenge: Verify the returned value.

πŸ’‘ Hints (1)
  • β€’ valueOf() returns the primitive value of the BigInt wrapper.