CSE 154 Code Quality Guide(JavaScript) {

A mostly reasonable approach to JavaScript adapted from Airbnb’s JavaScript Style Guide for CSE 154 at the University of Washington.

Questions about the changes? Most of them were to meet the learning objectives of the course and simplify the guide for our needs rather than opinions on code style, but feel free to reach out to the course staff with any questions.

NOTE: All JavaScript Code should lint. Check to see if your code lints by looking for a green check mark in your repo. The linter will automatically run and email you a report if your code does not lint.

Table of Contents

  1. Variables
  2. Strings
  3. Functions
  4. Naming Conventions
  5. Comparison Operators & Equality
  6. Loops
  7. If/Else Statements
  8. Boolean Zen
  9. Curly Braces
  10. Semicolons
  11. Comments
  12. Whitespace & Indentation
  13. Module Pattern & Strict Mode
  14. Good JavaScript Design

Variables

⬆ back to top

Strings

⬆ back to top

Functions

⬆ back to top

Naming Conventions

⬆ back to top

Comparison Operators & Equality

⬆ back to top

Loops

⬆ back to top

If/Else Statements

⬆ back to top

Boolean Zen

⬆ back to top

Curly Braces

⬆ back to top

Semicolons

⬆ back to top

Comments

⬆ back to top

Whitespace & Indentation

⬆ back to top

Module Pattern & Strict Mode

⬆ back to top

Good JavaScript Design

⬆ back to top

};