MDN URL: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Test_your_skills:_Object_basics
The cat.greeting() is not live i.e. not printing it to console.
tast 1 & task 3
Literally I expected to see something. But nothing came up!
Yep, in my browser console. Just the JS. Works fine.
Also, Please make the live editor more friendly. It's often struck in to loops.
anyways - awesome work team. #ToOpenVerse
MDN Content page report details
en-us/learn/javascript/objects/test_your_skills_colon__object_basicsDear @retr0c0de,
could you share the used Operating System (Windows, macOS, GNU/Linux, …) and browser with us?
Browser: Mozilla Firefox developer edition
OS: Windows 10 Pro 20H2
Hi @retr0c0de !
I just tried out the first object exercise, and the following code works fine:
let catName = cat.name;
cat.greeting();
cat.color = 'black';
The second line results in the "Meow!" greeting being printed to the console.
For exercise 3, ths following code works, including printing the greetings to the console:
let cat = {
name : 'Bertie',
breed : 'Cymric',
color : 'white',
greeting: function() {
console.log(`Hello, said ${this.name} the ${this.breed}.`);
}
}
let cat2 = {
name : 'Lisa',
breed : 'Persian',
color : 'white',
greeting: function() {
console.log(`Hello, said ${this.name} the ${this.breed}.`);
}
}
cat.greeting();
cat2.greeting();
But my firefox is updated. I'll retry and let you know.
@retr0c0de Since you closed the issue, can we conclude, that it worked for you now?
yeah. But it's still not printing on my machine. I tried re-installing my Firefox. But fine in chrome.