Help with Introduction to Objects The this Keyword II

So I was coding, and I noticed something inside of the module. It was telling me that in this example

let person = {
  name: 'David',
  age: 24 ,
  weekendAlarm: 'No alarms needed',
  weekAlarm: 'Alarm set to 7AM',
  sayHello: function() {
    if ( {
      return 'Hello, my name is David'
  sayGoodbye() {
    return 'Goodbye!'
	let friend = {
  friend.sayHello = person.sayHello;

According to the lesson, friend’s name should be the one popping up. However, when I printed this…it just repeated ‘Hello, my name is David’ twice. It still marked it as green (bug possibly?) but i’d like to get some help and know what is the -right- way to enter this in for future reference. I’ll be moving on and continuing because most of that topic I seem to understand just fine.

EDIT: Here is the link to the exercise!

If you have not yet resolved this, please post a link to the exercise so we are sure to be looking at the correct lesson. Thank you.

Thank you for your response! I edited the post and included the link at the end!

1 Like

The name should be a variable else it will always return David.

sayHello: function () {
    return `Hello, my name is ${}.`
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.