Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.04 KB

README.md

File metadata and controls

37 lines (24 loc) · 1.04 KB

01. How JavaScript runs

Understand the language, browser host APIs, and when scripts execute.

Learn

  • ECMAScript
  • browser APIs
  • script loading
  • execution order

How it works

JavaScript is the language; the browser provides document, events, and storage APIs. A script runs statements in order and can change the page after HTML is parsed. Keep code in a separate file so behavior can be inspected independently.

Common mistake

Do not confuse the language specification with browser APIs; document is not part of core ECMAScript.

Guided challenge

Open the example, inspect its script request, then move the script tag and explain when the code runs.

Run the example

Open example.html in a browser and edit example.js. Save, refresh, and use the Console and debugger to inspect values.

Completion check

  • Explain the core idea in your own words without reading the code.
  • Change one input and predict the output before running it.
  • Test one boundary or failure case, then record what you changed.