Question 10
Back to Exercise
What happens when you evaluate 5n + 1?
- A It returns 6n
- B It returns 6
- C TypeError: Cannot mix BigInt and other types Correct
- D It returns "5n1"
Correct Answer: Option C
Implicit conversion could lose precision, so arithmetic between BigInt and Number is forbidden. Write 5n + 1n or Number(5n) + 1. (Comparisons such as 5n > 1 are allowed.)
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!