JS Built-ins
BigIntvalueOfbeginner

BigInt.prototype.valueOf() β€” zero

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

valueOf() on a BigInt wrapper around 0n returns the primitive 0n.

BigInt valueOf() Zero

(0n).valueOf() === 0n is true.

Challenge: Verify valueOf for zero.

πŸ’‘ Hints (1)
  • β€’ Zero is falsy even as a BigInt.