Questenaتدريب يوضح لك ما ينبغي مراجعته لاحقًا
السؤال 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 TypeErrorالإجابة الصحيحة
  3. Every comparison between BigInt and Number throws
  4. 2n * 3 throws a TypeErrorالإجابة الصحيحة

الشرح

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.

تابع هذا الاختبار

بدء التدريب
السؤال 9: Which statements describe direct arithmetic between a… · JavaScript Fundamentals · Questena