Due to object in javascript is associative map (HashMap in other programming languages) does next code
for (var prop in object) { if (prop === someConc
I guess for the first one you meant:
if ('prop' in obj) { // ... }
Then you can talk about speed differences and different behavior.
Homework:
var obj = { prop: undefined }; // a bit philosophical...