JavaScript Number Precision, BigInt, and Formatting for Pythonistas Quiz
Interactive Quiz ⋅ 9 Questions
By Stephen Gruppetta
In this quiz, you’ll test your understanding of JavaScript Number Precision, BigInt, and Formatting for Pythonistas.
By working through this quiz, you’ll revisit how to keep money in whole cents,
compare totals with a tolerance that fits the data, keep long order numbers exact,
do big-integer arithmetic with BigInt, catch the Infinity and NaN results that
JavaScript returns where Python raises, and make Intl.NumberFormat round the way
Python’s format specs do.
Most questions show a short snippet ported from Python and ask what it does in JavaScript, or which line makes it print what the Python printed. Good luck!
The quiz contains 9 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Course
JavaScript Number Precision, BigInt, and Formatting for Pythonistas
Port a coffee roastery's month-end invoice script from Python to JavaScript, and learn to keep money and big IDs exact, catch Infinity and NaN, and format numbers like Python.