Ad
  • Custom User Avatar

    In javascript, the var in obj pattern will go through all of an Object's properties (keys) including all the keys in it's prototype chain. The call to hasOwnProperty ensures that the keys are in the immediate object; not any inherited prototype ones.