Skip to content

Commit c74a88c

Browse files
committed
feat: adds syntax explanations
1 parent 68f4d65 commit c74a88c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

syntax.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// 📌 JavaScript Basics - Syntax
2+
3+
// Welcome to the first section of the JavaScript Basics tutorial!
4+
// Here, you'll learn about JavaScript syntax and fundamental rules.
5+
6+
// 📖 What is JavaScript Syntax?
7+
// JavaScript syntax refers to the set of rules that define how JavaScript programs are written and interpreted.
8+
9+
// 🖥️ Example:
10+
11+
// Single-line comment
12+
13+
/*
14+
Multi-line comment
15+
*/
16+
17+
console.log("Hello, World!"); // Outputs text to the console
18+
19+
// 📝 Basic Syntax Rules
20+
// - Statements end with a semicolon (`;`) (optional but recommended).
21+
// - JavaScript is case-sensitive (`myVariable` and `myvariable` are different).
22+
// - Blocks of code are enclosed in curly braces `{}`.
23+
// - Comments can be single-line (`//`) or multi-line (`/* */`).

0 commit comments

Comments
 (0)