if (someobj.someproperty && someobj) {
The && condition will only proceed to check the next condition if the condition directly before it returned true. In this case 'someobj' must exist before the property 'someproperty' can be read, therefore the final check to see if 'someobj' exists will only be reached if a property of that object exist - at this point it is already assumed that 'someobj' exists. I think I just talked myself into a circle there.
Entirely worthless. There, I said it again.
No comments:
Post a Comment