This repository contains a collection of JavaScript lessons, designed to teach the fundamentals of the language in a hands-on way.
Each lesson is contained in its own numbered folder (e.g., lesson1, lesson2, etc.). Inside each folder, you will find the following files:
- index.html: The main HTML file for the lesson.
- index.js: The JavaScript file containing the lesson's code.
- style.css: The CSS file for styling the lesson's webpage.
- Lesson 1: Introduction to JavaScript & "Hello, world!"
- Lesson 2: Variables
- Lesson 3: Arithmetic Operators
- Lesson 4: User Input
- Lesson 5: Type Conversion
- Lesson 6: Constants
- Lesson 7: Counter Program ⭐
- Lesson 8: Math Object
- Lesson 9: Random Number Generator ⭐
- Lesson 10: If Statements
- Lesson 11: Checked Property
- Lesson 12: Ternary Operators
- Lesson 13: Switches
- Lesson 14: String Methods
- Lesson 15: Method Chaining
- Lesson 17: Logical Operators
- Lesson 18: Strict Equality
- Lesson 19: For Loops
- Lesson 20: Number Guessing Game ⭐
- Lesson 21: Functions
- Lesson 22: Variable Scope
- Lesson 23: Temperature Conversion ⭐
- Lesson 24: Arrays
- Lesson 25: Spread Operator
- Lesson 26: Rest Parameters
- Lesson 27: Dice Roller ⭐
- Lesson 28: Random Password Generator ⭐
- Lesson 29: Callbacks
- Lesson 30: forEach
- Lesson 31: map
- Lesson 32: filter
- Lesson 33: reduce
- Lesson 34: Function Expressions
- Lesson 35: Arrow Functions
- Lesson 36: Objects
- Lesson 37: thisKeyword
- Lesson 38: Constructors
- Lesson 39: Classes
- Lesson 40: Static Keyword
- Lesson 41: Inheritance
- Lesson 42: superKeyword
- Lesson 43: Getters & Setters
- Lesson 44: Destructuring
- Lesson 45: Nested Objects
- Lesson 46: Arrays of Objects
- Lesson 47: Sorting
- Lesson 48: Shuffling
- Lesson 49: Dates
- Lesson 50: Closures
- Lesson 51: setTimeout
- Lesson 52: Digital Clock ⭐
- Lesson 53: Stopwatch ⭐
- Lesson 54: ES6 Modules
- Lesson 55: Asynchronous Code
- Lesson 56: Calculator ⭐
- Lesson 57: DOM Introduction & Element Selectors
- Lesson 58: DOM Navigation
- Lesson 59: Adding & Changing HTML Elements
- Lesson 60: Event Listeners
- Lesson 61: Key Events
- Lesson 62: Show & Hide Elements
- Lesson 63: NodeLists
- Lesson 64: classList
- Lesson 65: Rock, Paper, Scissors Game ⭐
- Lesson 66: Image Slider ⭐
- Lesson 67: Callback Hell
- Lesson 68: Promises
- Lesson 69: Async/Await
- Lesson 70: JSON
- Lesson 71: Fetch API
- Lesson 72: Weather App ⭐
To use these lessons, simply clone the repository and open the index.html file of the desired lesson in your web browser. You can then view the code in the index.js and style.css files to understand how the lesson works.