What is the result of the following code?
function greetingFactory(greeting) {
return function(name) {
return `${greeting}, ${name}`;
};
}
const helloGreeting = greetingFactory("Hello");
console.log(helloGreeting("World"));
What is the result of the following code?
function greetingFactory(greeting) {
return function(name) {
return `${greeting}, ${name}`;
};
}
const helloGreeting = greetingFactory("Hello");
console.log(helloGreeting("World"));