JS

JavaScript Code Output Challenge - function javasc...

21.

What will be the output of the following code?

function greet(name) {
  console.log(`Hello, ${name}!`);
}

const person = {
  name: "Alice",
  greet: greet,
};

person.greet("Bob");

ReferenceError: greet is not defined

TypeError: person.greet is not a function

Hello, Alice!

Hello, Bob!