Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Setup
- var myObj = {
- gift: "pony",
- pet: "kitten",
- bed: "sleigh"
- };
- function checkObj(checkProp) {
- // Your Code Here
- if (myObj.hasOwnProperty(checkProp)) {
- return checkProp;
- }else {
- return "Not Found";
- }
- }
- // Test your code by modifying these values
- checkObj("gift");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement