Table of Contents
-
Introduction to JavaScript
-
History & Key Features
-
Setup & First Program
-
Variables & Constants
-
Data Types
-
Operators
-
Conditional Statements
-
Loops
-
Functions
-
Arrays
-
Objects
-
Strings
-
Date & Math
-
DOM Manipulation
-
Events
-
Form Validation
-
ES6+ Features
-
Asynchronous JavaScript
-
Error Handling
-
LocalStorage & SessionStorage
-
JSON
-
Classes & OOP
-
Prototype & Inheritance
-
Hoisting & Scope
-
Closures
-
Execution Context & Event Loop
-
Map, Filter, Reduce
-
Regular Expressions
-
Advanced Concepts
-
Interview Questions & Practice Projects
🧩 Chapter 1: Introduction to JavaScript
JavaScript is a lightweight, interpreted scripting language used to create dynamic and interactive web pages.
HTML defines the structure, CSS adds styling, and JavaScript adds logic and behavior.
🔹 Example
🧠Key Notes
-
JavaScript runs inside browser engines
-
Chrome → V8
-
Firefox → SpiderMonkey
-
-
JavaScript controls the behavior of a webpage
Chapter 2: History & Key Features
History
JavaScript was created in 1995 by Brendan Eich at Netscape.
Originally named Mocha → LiveScript → JavaScript.
It is standardized as ECMAScript (ES).
Important Features
-
Lightweight & fast
-
Interpreted
-
Object-Oriented
-
Dynamic typing
-
Prototype-based inheritance
-
Event-driven
Example
Chapter 3: Setup & First Program
To write JavaScript, you only need:
-
A browser
-
A text editor (VS Code recommended)
Basic Steps
-
Open VS Code
-
Create an HTML file
-
Use
<script>tags inside body or head
Example
Chapter 4: Variables & Constants
Variable Types
| Keyword | Scope | Reassign? | Use Case |
|---|---|---|---|
| var | function | yes | old JS |
| let | block | yes | modern use |
| const | block | no | constant values |
Example
Chapter 5: Data Types
Primitive Types
-
String
-
Number
-
Boolean
-
Undefined
-
Null
-
Symbol
-
BigInt
Example
Composite Types
-
Object
-
Array
Chapter 6: Operators
Categories
-
Arithmetic → +, -, *, /, %, **
-
Comparison → ==, ===, !=, >, <
-
Logical → &&, ||, !
-
Assignment → =, +=, -=
-
Ternary → condition ? true : false
Example
Chapter 7: Conditional Statements
if-else
switch
Chapter 8: Loops
-
for
-
while
-
do...while
-
for...of
-
for...in
Example
Chapter 9: Functions
Normal Function
Arrow Function
Chapter 10: Arrays
Example
Common Methods
-
push(), pop()
-
shift(), unshift()
-
slice(), splice()
-
indexOf()
Chapter 11: Objects
Example
Chapter 12: Strings
Example
Chapter 13: DOM Manipulation
Chapter 14: Events
Common Events
-
onclick
-
onchange
-
onmouseover
-
onkeyup
-
onload
Example
Chapter 15: ES6+ Features
Popular Features
-
let & const
-
Template literals
-
Arrow functions
-
Destructuring
-
Spread operator
-
Modules
-
Classes
-
Promises
Example
Chapter 16: Asynchronous JavaScript
Promise Example
Async/Await Example
Chapter 17: Closures
Example
Chapter 18: Hoisting & Scope
Chapter 19: Map, Filter, Reduce
Chapter 20: Event Loop (Advanced)
Chapter 21: Final Practice Projects
-
Calculator App
-
To-Do List
-
Digital Clock
-
Form Validation System
-
Typing Speed Tester
-
Weather App (API based)
-
Notes App (LocalStorage)

0 Comments