Subj : Re: "x = " vs. "var x = " To : netscape.public.mozilla.jseng From : =?ISO-8859-1?Q?Georg_Maa=DF?= Date : Mon Sep 06 2004 10:27 pm Sterling Bates wrote: > Just a quick q: why does the expression "var x = 5" return "undefined"? This is not an expression. This is a statement, declaring a variable x initializing it with 5. > The expression "x = 5" returns 5, as I would expect. This is an expression, not an initialization. -- Georg Maaß - bioshop.de D-76227 Karlsruhe, Westmarkstraße 82 HTML, XML / JavaScript, C++, Java, PHP, VB / CGI, JSP, ASP, ASP.net - The ultimate DHTML engine: http://gml-modul.sourceforge.net - http://sourceforge.net/projects/gml-modul .