JavaScript Syntax for Pythonistas (Summary)

Congratulations, you made it to the end of the course! The Fernleaf Bakery release note now runs in JavaScript. Maya pastes today’s note for version 2.4.1, two open bugs and all, into the client’s channel, and tomorrow Theo’s note reads the same way.

In this course, you learned how to:

  • Read and write blocks by their braces, whatever the indentation says
  • Write an empty block as {} with a comment inside, and comment code with //, /* */, and /** */ JSDoc blocks
  • End statements with semicolons, and break long lines inside brackets or after an operator
  • Tell expressions from statements, and declare a let and assign it in each branch of an if/else where Python would use a conditional expression
  • Name things the JavaScript way, and leave the rest of the style to a formatter

Keep the Habits That Carry Over

Indenting each block and keeping lines short carry over, though most JavaScript projects, and Prettier by default, indent by two spaces rather than four. Naming fixed settings in UPPER_SNAKE_CASE looks the same.

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.