Advertisement
Guest User

Untitled

a guest
Jun 30th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. function lookUpProfile(firstName, prop){
  4. if (contacts.firstName.hasProp(firstName) && contacts.hasProp(prop)) {
  5.   return contacts.firstName.firstName;
  6. }
  7.   else if(!(contacts.firstName.hasOwnProperty(firstName))) {
  8.           return "no such contact";
  9. }
  10.   else if (contacts.firstName.hasOwnProperty(firstName) && (!(contacts.hasProp(prop)))) {
  11.   return "no such property";
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement