function checkObj(obj, checkProp) {
// Only change code below this line
if (myObj.hasOwnProperty(checkProp)) {
return myObj[checkProp];
} else {
return "Not Found"
}
// Only change code above this line
}
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 6.0.1; q201_9377) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36.
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
The instruction video is bit old I think and the exerciser is bit different now. In the video it shows a method below function checkObj(checkProp)
But exerciser is changed and now the method is like below
function checkObj(obj, checkProp)
So with this you need to send the object you are checking the prop as well to the method. That is a more practical way of doing things. So in your code you need to myObj to obj so that it reflects the 1st parameter of the function