Nearby lessons
24 of 40📢 JavaScript alert()
📌 What is JavaScript alert()?
The alert() method displays a message box with an OK button.
Used to show important information or warnings to the user.
📋 alert() Basics
| Attribute | Description |
|---|---|
Syntax | alert(message) |
Return | undefined |
Use Case | Simple notifications |
Code Example
PREVIEW READY
🧠 Test Your Knowledge
2 QuestionsProgress: 0 / 2
Keep Going!JS - Confirm Boxes