The Starline Awards desk needs the same greeting for every guest. Write it once as a function, then call it with different names. Work in script.js and check your output in the Console.
Functions package logic into a reusable block. This lesson keeps the goal small: write one greeting function and prove that it works for two different names.
function makeBadge(name) {
return `Visitor: ${name}`;
}
console.log(makeBadge("Ari"));
greet(name) returning Hello, <name>!.Hello, Alice! | Hello, Bob! by calling greet twice.Your function should accept a name parameter and return a string.
Call the function twice and join the results with |.