Ticket #6788 (closed bug: invalid)
getWH is a function declared as a statement
|Reported by:||saurik||Owned by:|
That said, implementations do handle this situation differently: while most treat them as declarations from the enclosing function/program scope (and thereby get the somewhat weird behavior that the last one, even if never "executed", is the one that is bound to the name), FireFox treats them as part of the control flow (and thereby will rebind the name as it runs into these statements while executing, which is also surprising as this is not how declarations normally work).
So, while jQuery's usage happens to not trigger any of these behavior differences, it seems weird not to just move the function to the enclosing scope and just be clear of these issues (and also not get warnings with tools designed to detect these types of ECMA compliance bugs).