Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 489 Bytes

README.md

File metadata and controls

18 lines (11 loc) · 489 Bytes

Lesson 05: Syntax: statements & semicolons

How JS is structured: statements, expressions, blocks.

What you'll learn

  • a statement performs an action; an expression produces a value
  • semicolons end statements — JS inserts them automatically (ASI), but be careful
  • code blocks are wrapped in { }
  • ASI pitfall: a line starting with ( or [ can merge with the line above

Example

See examples/.

Exercise

Find an example where missing a semicolon changes behavior.