Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Welcome to the Boiler Log Digest

This course shows you how JavaScript programs import modules, take command-line arguments, and work with files. Imports, arguments and files all have JavaScript counterparts, but a few of the differences fail quietly.

Your project is a school site manager’s Python tool for the weekly boiler log, and you’ll port it to JavaScript. Here’s a first taste. The Python script takes the log’s name and the limit from the command line, and prints both. These are its first lines:

Language: Python
import sys

def main():
    path = sys.argv[1]
    threshold = float(sys.argv[2])

    print(f"Checking {path} against {threshold}")

if __name__ == "__main__":
    main()

Run as python digest.py logs/week-44.log 75, it prints this:

Language: Program Output
Checking logs/week-44.log against 75.0

Locked learning resources

Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert JavaScript developers.

Unlock This Lesson

Already a member? Sign-In

Become a Member to join the conversation.