🔤JavaScript
Also known as JS, ECMAScript
The language every web browser runs. It makes web pages react to clicks and typing.
Think of it like
Think of it like the wiring in a toy. The page is the toy, and JavaScript makes the buttons light up and move.
Example
Lucy picks a second pair of shoes. JavaScript on the page updates the cart total at once.
Why it matters
If code runs in a web page, it is almost always JavaScript. Every web developer has to know some.
Definition
Example code
javascript
console.log("Hello, world!");
// Hello, world!Common mistake
Key takeaways
- 1Runs in the browser. No install needed to run it.
- 2Also on servers. Node.js runs it outside the browser.
- 3Loose with types. "5" + 5 gives "55", not 10.