JavaScript
JavaScript SyntaxJavaScript Syntax
JavaScript syntax defines the rules for writing code.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
JavaScript syntax tells the computer how to read the program. The language defines fixed values known as literals and variable values known as variables. Developers must follow these exact rules, or the browser will throw errors.
Key Points
- Numbers do not require quotes.
- Strings require single or double quotes.
- Variable names are case-sensitive.
- Hyphens are not allowed in names.