7. Know Thyself solution for those who are unsure


#1

Hey there everyone stuck on 15/7! I thought i'd give you all a solution since scrolling through the fourms can be messy at times! So here ya go and enjoy!

var myObj = {
    // finish myObj
    name: "Gemmma",
    
};

console.log( myObj.hasOwnProperty('name') ); // should print true
console.log( myObj.hasOwnProperty('nickname') ); // should print false

#2

That's very kind for you to give everyone the code.

But here's a little head's up for next time:

People who are true stuck on levels, deserve the working code, but some people are lazy and just ask for the working code just to pass the lesson.

This is a working community and everyone needs not to try and just get through the lessons quickly. I myself did that once and trust me, I didn't learn anything.

You can help people who post asking for help, but, you aren't really supposed to give anyone working code.

(Hopefully I wasn't too harsh)

:smile:

Kat


#3

Please take a look an these. I don't know how to fix this problem.
Can someone help? :confused:


#4

Change your name = "Gemma" to name: "Gemma"

Hope it helps you :slight_smile:


#5

Yes! It helps - work with : :slight_smile:

Amazing how many time I lose on this easy excersise :smiley:


#6

you use : for object literal so yeah delete = and put :


#7

Totally right :slight_smile:


#8

thank you tons pal. i was stumped on it lol