Question about javascript from a rookie.
I need your help, thank you.

Question about javascript from a rookie.
I need your help, thank you.

It says undefined because nothing get returned by the function sayHi ; and you are displaying the return of the function.
function sayHi() {
console.log('Hello');
}
console.log(sayHi());
function sayHi2() {
console.log('Hello');
return 'returned value';
}
console.log(sayHi2());
Because you console.log() your console.log().
You only need to call instructor.sayHi() or your sayHi function should return a string that you console.log().