Course Content
Module 1: Introduction to JavaScript
0/1
Lesson 2 Variables, Data Types & Operators
0/1
Lesson 3 Conditional Statements
0/1
Lesson 4 Loops
0/1
Lesson 5 Functions
0/1
Lesson 6 Arrays & Objects
0/1
Lesson 7 DOM Introduction
0/1
Lesson 8 Event Handling
0/1
Lesson 9 ES6 Basics
0/1
JavaScript for Beginners: From Zero to Building Interactive Web Apps

DOM Introduction

What is the DOM?

Selecting and changing elements with JS

🧪 Practice:

Change the text of an HTML element using JavaScript

✅ Example (with HTML + JS):

 
<p id="demo">Old Text</p>
<button onclick="changeText()">Click Me</button>

<script>
function changeText() {
document.getElementById("demo").innerText = "New Text!";
}
</script>