It seems to me that there are four different ways I can determine whether a given object (e.g. foo) has a given property (e.g. bar) defined:
foo
bar
one difference is that, method 1 will check only foo object for property bar while the last two methods will also check the prototype for inherited property.