Loading video player…

Welcome to the End-of-Day Release Note

JavaScript code has a different shape from Python’s. Its blocks, statements, line breaks, and names follow their own rules, and code that looks right by Python’s rules can run differently. Here’s the bug check from a release-note script on a day with no open bugs, first in Python:

Language: Python
BUGS_OPENED = 9
BUGS_CLOSED = 9
open_bugs = BUGS_OPENED - BUGS_CLOSED
print(f"Open bugs: {open_bugs}")

if open_bugs > 0:
    print("Please check the bug tracker.")
    print("Triage call at 9:30 tomorrow.")

Python prints Open bugs: 0 and skips both lines under its if. Here’s a JavaScript port, indented the same way:

Language: JavaScript
const BUGS_OPENED = 9;
const BUGS_CLOSED = 9;
const openBugs = BUGS_OPENED - BUGS_CLOSED;
console.log(`Open bugs: ${openBugs}`);

if (openBugs > 0)
  console.log("Please check the bug tracker.");
  console.log("Triage call at 9:30 tomorrow.");

When you run it with no open bugs, it still prints the second line, and there’s no error:

Language: Program Output
Open bugs: 0
Triage call at 9:30 tomorrow.

This course shows you why, and how JavaScript developers write code that runs the way it reads.

You’ll help a small web agency that ships to its clients’ sites most afternoons. Whoever ships last edits a few settings at the top of a script, runs it, and pastes the release note into the client’s channel. Today the client is Fernleaf Bakery, the version is 2.4.1, and Maya is deploying. The agency is moving its tools to JavaScript, and you’ll port the script one kind of line at a time.

By the end of this course, you’ll be able to:

  • Read and write blocks by their braces, including empty ones
  • Comment and document code with //, /* */, and JSDoc blocks
  • End statements and break long lines without changing what the code does
  • Tell expressions from statements, and avoid an assignment slipping into a condition
  • Name things the JavaScript way, and let a formatter decide the style
  • Port a short Python script to JavaScript, line by line

You need to know how to write Python comfortably, have Node installed, and know a little JavaScript: declaring names with const and let, writing an if, and writing a function. The examples use Node 26 and Python 3.15, and a current version of each is fine.

The course mixes short videos and text lessons, with exercises where you write the code yourself. Every video has a summary below it, so you can review without rewatching. A project ports the whole release note, and a quiz and a summary close the course.

Next up: Reading Blocks by Their Braces, where you find out why that second line ran.

Download

Sample Code (.zip)

8.2 KB
Download

Course Slides (.pdf)

679.1 KB

00:00 Welcome to JavaScript Syntax for Pythonistas! This course is about the shape of JavaScript code: how it marks blocks, ends statements, and names things. Your project is a web agency’s end-of-day release note, the Python script that whoever ships last runs for the client, and you’ll port it to JavaScript.

00:18 Here’s a first taste. On a day with no open bugs, this Python note skips both lines under its if. Here’s the JavaScript port, with the same two lines indented under its if, and no braces.

00:34 It books a triage call for bugs that don’t exist. No error. Why? The indentation looks right. Code that looks right by Python’s rules can run differently, and this course shows you why.

00:52 The agency ships to its clients’ sites most afternoons. Whoever ships last edits a few settings, runs the script, and pastes the note into the client’s channel.

01:03 Today it’s Fernleaf Bakery, and Maya is deploying. You’ll port the script to JavaScript, one kind of line at a time.

01:13 By the end, you’ll read blocks by their braces, end statements and break lines safely, tell expressions from statements, and name things the JavaScript way.

01:22 Then the project ports the whole release note.

01:28 You’ll need Node installed and a little JavaScript: names, if, and functions.

01:35 Short videos like this one mix with text lessons and exercises, and every video has a summary below it. A project puts it together, and a quiz and a summary close the course.

01:47 The next video, Reading Blocks by Their Braces, starts with this same if.

Become a Member to join the conversation.