Here are the key points about JavaScript syntax:
- JavaScript is case-sensitive. Keywords like var, if, else must be lowercase.
- Statements should end with semicolons. Semicolons separate statements.
- Whitespace like spaces and newlines are ignored, except in strings.
- Strings can be delimited by single or double quotes. Double quotes can be used inside single-quoted strings and vice versa.
- Backslashes allow special characters to be used in strings, like \n for newline.
- Brackets [] and parentheses () group items together. Curly braces {} group statements.
- Comments are lines ignored by the interpreter, denoted by // for single-line