Subj : Misleading " undefined" error To : netscape.public.mozilla.jseng From : user Date : Fri Jul 15 2005 01:28 pm Hello, I came across a (at last for me) confusing error: function test1() { variable = document.foo; alert(variable); } test1() alerts correctly [undefined] as value for variable. function test2() { alert(variable); } This function fails with an JavaScript error "variable is not defined". Shouldn't this error better be "variable does not exist"? So maybe it is easier to understand the difference between an variable with a value of "undefined" and an undefined variable? What do you think? Regards, Kai .