Welcome to the JavaScript Tutorial

Example Code


function greet(name) {
    console.log("Hello, " + name);
}

    

To run your code, press Ctrl + Enter.

Output

Hello, Alisha

Understanding Variables

In the function above, name is a placeholder for the actual name you pass to the function.