JavaScript Modules and Scripts for Pythonistas (Fast Track) Quiz

Interactive Quiz ⋅ 9 Questions
By Stephen Gruppetta

In this quiz, you’ll test your understanding of JavaScript Modules and Scripts for Pythonistas (compact).

By working through this quiz, you’ll revisit the Python habits that misfire when a Python tool moves to JavaScript: importing a name the other file doesn’t export, mixing up default and named imports, writing an import in Python’s order, pasting a require() line into a module, porting the __name__ guard, trusting Number() to refuse what float() refuses, reading a file without an encoding, splitting an empty file, and writing a file one line at a time.

Most questions show a short snippet from Dev’s boiler log digest, or from Asha’s sports hall port, and ask what it does in JavaScript, or how to fix it. 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

An operator checks a modular machine with a cable socket and paper consoles labeled IMPORT, ARGV, and READ.

Course

JavaScript Modules and Scripts for Pythonistas (Fast Track)

The shorter version for experienced Pythonistas: port a Python boiler log digest to JavaScript, and learn modules, script arguments, exit codes, and reading and writing files.

basics js py