JavaScript - 5
JavaScript - 5: Functions
Create a function called greet that takes a name as a parameter and uses console.log() to print a greeting message. Then call the function with your name.
👀 Show Solution
function greet(name) {
console.log("Hello " + name + "! Welcome to JavaScript.");
}
greet("Sarah");