FirstHack 2026 — a 36-hour online hackathon built for first-year students.•₹1,00,000 prize pool•22 Oct – 4 Nov•Open to every branch and every stream•Certificate for every team that submits•3 rounds•FirstHack 2026 — a 36-hour online hackathon built for first-year students.•₹1,00,000 prize pool•22 Oct – 4 Nov•Open to every branch and every stream•Certificate for every team that submits•3 rounds•
The language of the browser, and how it reaches into your page and edits it.
13 min read·Lesson 4 of 6·Pro
Why JavaScript exists
HTML gives structure. CSS gives looks. Neither can react. Nothing can change after the page loads. JavaScript is the third piece: it runs inside the browser and can read and change the page while the user is on it.
Add it just before the closing </body> tag:
Code
<script src="app.js"></script>
</body>
Why at the bottom? Because the script runs the moment the browser reaches it. If it runs before the elements exist, it finds nothing.
Variables
JavaScript
let count = 0; // can be reassigned
const name = "Ravi"; // cannot be reassigned
count = count + 1;
The rest of this lesson is Pro
The free lessons of Web Development Basics finish what
they start — read those first if you have not. This one goes further, and it
is part of the paid half.
A pass opens the paid lessons of every course, the mock test papers
and the company-wise series. It ends on its own date; nothing renews by itself.