Lessons
π How to Use the Course Git Repository
This course uses a public GitHub repository to show the complete code at every stage of learning.
Each lesson is mapped to a Git branch, so you can see exactly how the application evolves over time.
Β
π Repository Link
π GitHub Repo:
https://github.com/aditechkb/javascript-basics
Β
π§ How the Repository Is Structured
mainbranchContains the final version of the application
All lessons merged together
Lesson branches
Each lesson has its own branch
The branch shows the code up to that lesson only
Example (naming may vary):
lesson-01-html-setuplesson-02-dom-accesslesson-03-events-state
Think of each branch as a snapshot in time.
Β
π Option 1: View Code Directly on GitHub (No Setup Needed)
This is the easiest way if you just want to read the code.
Steps:
Open the repository link
Click the branch dropdown (top-left, usually shows
main)Select the branch for the lesson you want
Browse the files and code for that lesson
π This is perfect for:
Reviewing after a lesson
Comparing changes between lessons
Understanding how code evolved
Β
π» Option 2: Run the Code on Your Local Machine (Recommended)
If you want to experiment and practice, clone the repo.
Step 1: Clone the repository
git clone https://github.com/aditechkb/javascript-basics.git
Step 2: Move into the project folder
cd javascript-basics
Step 3: List all available lesson branches
git branch -a
Step 4: Switch to a specific lesson
git checkout lesson-01-html-setup
(Replace the branch name with the lesson you want.)
Β
π Switching Between Lessons
At any time, you can switch lessons by changing branches:
git checkout lesson-03-events-state
Your files will automatically update to match that lesson.
Β
π Going Back to the Final Version
To return to the complete application:
git checkout main
Β
β οΈ Important Notes for Students
Do not edit code directly on
mainUse lesson branches for learning and experimentation
If you make changes and want to discard them:
git checkout .
Β
π― How to Follow Along with the Course
Watch the lesson
Switch to the corresponding Git branch
Read the code
Run it locally
Modify and experiment
Move to the next lesson branch
This mirrors how real development happens in teams.
Β
π§© Why We Use Branches in This Course
βEach branch represents a learning milestone, not just code.β
This approach helps you:
Understand why code was written
See progression, not just the final result
Learn Git naturally alongside JavaScript