JavaScript Syntax Basics
Syntax is the set of rules that defines how JavaScript code must be written. Following these rules allows the browser or Node.js to understand and execute your code correctly.
This lesson covers the essential basics with clear examples you can run immediately.
Statements
A statement is a single instruction in JavaScript. Each statement usually performs one action.
Multiple statements can appear one after another.
Semicolons
Statements typically end with a semicolon (;). While JavaScript can often insert them automatically (ASI), it's best practice to include them for clarity and to avoid errors.
Case Sensitivity
JavaScript is case-sensitive: uppercase and lowercase letters are treated as different characters.
Comments
Comments are notes in the code that are ignored during execution. They help explain what the code does.
Single-line comments start with //
Multi-line comments use /* */
Code Execution Order
JavaScript executes code from top to bottom, line by line.
Quick Quiz
Az anyagokat átnéztük és ellenőriztük, de hibák továbbra is előfordulhatnak. A tartalom kizárólag oktatási célt szolgál, ezért saját felelősségre használd, és szükség esetén ellenőrizd más forrásokkal is.
✨ Kérdezd Larát — a tanulási partnered
Fedezd fel a személyre szabott tanulási támogatást. Lara elmagyarázza az anyagot, összefoglalja a témákat és megválaszolja a kérdéseidet — az Go csomagtól elérhető.
Lara segít gyorsabban tanulni — kizárólag a ReadyTools Go, Plus és Max tagoknak.

