JavaScript Coding Tutorial

Example Code


// Function to greet a user
function greet(name) {
    console.log("Hello, " + name + "!");
}

// Example usage
greet("Alice"); // Output: Hello, Alice!

    

Save Your Work

To save your code, press Ctrl + S on Windows or Cmd + S on Mac.

Expected Output

When you run the above code, you should see the following output in the console:

Hello, Alice!