QuestenaPractice that shows what to review next
Question 9

Which statements describe direct arithmetic between a BigInt and a Number? Select all that apply.

  1. The Number is always converted to BigInt automatically
  2. 1n + 1 throws a TypeErrorCorrect answer
  3. Every comparison between BigInt and Number throws
  4. 2n * 3 throws a TypeErrorCorrect answer

Explanation

Direct use of arithmetic operators such as plus or multiplication with one BigInt and one Number throws a TypeError. Converting one operand first can align the numeric types, while claiming automatic conversion ignores the required type separation.

Continue with this test

Start practice
Question 9: Which statements describe direct arithmetic between a… · JavaScript Fundamentals · Questena