84
rated 0 times
[
91]
[
7]
/ answers: 1 / hits: 108520
/ 14 Years ago, tue, january 18, 2011, 12:00:00
The jQuery Core Style Guidelines suggest two different ways to check whether a variable is defined.
- Global Variables:
typeof variable === "undefined"
- Local Variables:
variable === undefined
- Properties:
object.prop === undefined
Why does jQuery use one approach for global variables and another for locals and properties?
More From » jquery