Not sure I undersnad why the function works for the first property, the error one, but not the second…
Your code so far
// Setup
var myObj = {
gift: "pony",
pet: "kitten",
bed: "sleigh"
};
function checkObj(checkProp) {
// Your Code Here
if (myObj.hasOwnProperty(checkProp)) {
return myObj.(checkProp);
}
else {
return "Not Found";
}
}
// Test your code by modifying these values
checkObj("gift");
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.
Your code works if you switch to bracket notation. Double check that you’ve made the change correctly and post your updated code here if it’s still not passing.
Thank you, for both GUIDING me, and not simply giving me the answer, cause it helps me learn a lot, and also thank you for taking time helping a noob =)
I’ll go read this lesson again.
Edit : okay, some things are still confuse for me right now but I understood my mistake. thanks again =)