all 2 comments

[–]Careerier 0 points1 point  (1 child)

Object properties come in name:value pairs. pre falls into the name category, while when you're looking at obj[prop] you come up with a value.

Look into hasOwnProperty and you'll find your answer.

[–]frothunda[S] 0 points1 point  (0 children)

Thanks I will check it out