Objective:

Practice declaring variables, updating them, displaying values, and following naming rules.

🧩 Program 1: Personal Info Variables

Instructions:

  1. Declare three variables to store your name, age, and city.
  2. Print all three using console.log().
  3. Update the age variable and print again.
  4. Use let for variables that can change and const for values that don’t change.

✅ Output:

Before update:
Ali 22 Karachi
After update:
Ali 23 Karachi

🧩 JS-Practice-02 : Program 2 – Interactive Greeting

Objective:

Take user input using prompt() and display a greeting message using console.log() and alert().

Instructions:

  1. Ask the user for their name using prompt().

  2. Ask the user for their age using prompt().

  3. Display a greeting message:

    "Hello, <name>! You are <age> years old."

  4. Use console.log() and alert() to show the message.

✅ How it works:

  1. Browser asks: "Enter your name:" → user types Ali