BigInt and Symbol
BigInt represents arbitrarily large integers. Symbol creates a unique primitive value that can be used as a property key; some well-known symbols define language protocols.
Use the value type that matches the problem, and do not confuse equal descriptions with equal symbol identities.
See the mechanism
9007199254740994nFollow one example
The n suffix creates a BigInt without first rounding through Number. Arithmetic generally cannot mix Number and BigInt directly, and BigInt division truncates toward zero. Two fresh Symbol("article") calls create distinct values even though the descriptions match. Symbol.iterator is instead a shared well-known key used by iterable protocols. JSON does not directly serialize BigInt values.
Predict, change and check
Predict: Will converting an already rounded large Number into BigInt recover the digits that were lost?
Test your explanation: Compare BigInt("9007199254740993") with BigInt(9007199254740993). Construct exact integers from strings or BigInt literals, not from an unsafe intermediate Number.
The tasks below ask you to explain that result and apply the idea to different inputs.
Apply and distinguish
Exact integers and unique identities
A BigInt can represent integers beyond Number's safe-integer range, but it is not a floating-point decimal type. Convert deliberately before mixing Number and BigInt; arithmetic generally does not permit mixing them. BigInt division truncates toward zero, and ordinary JSON serialization needs an explicit representation for BigInt values.
Symbol('saved') creates a unique symbol each time; the description is a debugging label, not identity. Symbol.for uses a shared registry and can return the same registered symbol for the same key. Symbol-valued property keys are not listed by Object.keys. Well-known symbols such as Symbol.iterator let objects participate in language protocols; they are not user-visible string field names.
Check your understanding: State the input contract, identify the operation that changes the result, and give one boundary input that would distinguish the correct rule from the mistake described above.