DEV Community

Discussion on: 70 JavaScript Interview Questions

 
macmacky profile image
Mark Abeto

I've changed the object.

It looks like this now.

 const myFavoriteObj = {
     guessThis(){
        function getThis(){
          console.log(this);
        }
        getThis();
     },
     name: 'Marko Polo',
     thisIsAnnoying(callback){
       callback();
     }
   };


`

Thanks

Thread Thread
 
greatgraphicdesign profile image
Alek Vila

Ah, I see the change now. You removed .name from where it used to say console.log(this.name); Thank you!

Thread Thread
 
macmacky profile image
Mark Abeto

Your welcome. Thanks, again for finding my mistake.

Thread Thread
 
kuncheriakuruvilla profile image
Kuncheria Kuruvilla • Edited

Hey , even now i think there is a problem.
Shouldn't it be
this.name = "Ford Ranger";

rather than
var name = "Ford Ranger";

for question number 24 ?