JS Built-ins
BigIntvalueOfbeginner

BigInt.prototype.valueOf() β€” typeof result

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

Calling valueOf() on a BigInt primitive returns itself.

BigInt valueOf() Type

typeof (42n).valueOf() is 'bigint'.

Challenge: Verify the return type.

πŸ’‘ Hints (1)
  • β€’ valueOf() preserves the BigInt type.