Last active 58 minutes ago
0
0
1
| 1 | // 1. Variables and Data Types |
| 2 | const greeting = "Hello, JavaScript world!"; // String (cannot be reassigned) |
| 3 | let counter = 10; // Number (can be changed) |
| 4 | const isLearning = true; // Boolean |
| 5 | |
| 6 | console.log(greeting); |
| 7 | |
| 8 | // 2. A Simple Function |
| 9 | // This function takes a name as an input and returns a personalized message |
| 10 | function greetUser(userName) { |