Skip to content

Latest commit

 

History

History

05-syntax-and-semicolons

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

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.