Quick Coding Tutorial: Variables & Functions

In this tutorial, we'll use JavaScript to demonstrate variables and functions.

1. Variables

Variables store data. Example:

let age = 25;

2. Functions

Functions execute reusable code. Example:

function greet(name) {
    return "Hello, " + name + "!";
}
greet("Suhani");

3. Running the Code

Open Developer Tools and paste the code in the console. Use Ctrl+Shift+I (Windows) or Cmd+Option+I (Mac).

Expected Output:

Hello, suhani!