jobo: document objekt

Beitrag lesen

Hallo,

erstmal danke an alle mit ihren schnellen und hilfreichen antworten ^^
also:

  1. ja , global oder nicht global hat was damit zu tun ob "var" benutzt wird oder nicht ;)

Naja, hat es, aber es hat eigentlich etwas mit "schlechtem" Programmierstil zu tun (= Variablen _immer_ deklarieren!) bzw./oder ist ein "bad part" der Sprache:

"JavaScript's biggest problem is its dependence on global variables, particularly implied global variables. If a variable is not explicitly declared (usually with the var statement), then JavaScript assumes that the variable was global. This can mask misspelled names and other problems."
http://www.jslint.com/lint.html

Gruß

jobo