Subj : Re: "x = " vs. "var x = " To : netscape.public.mozilla.jseng From : =?ISO-8859-1?Q?Georg_Maa=DF?= Date : Sat Oct 09 2004 03:50 pm Brendan Eich wrote: > Note the difference between no eval result and undefined eval result: > > eval("42; var x=43; 44") => 44 > > while > > eval("42; var x=43") => 42. and eval("42; void(x=43);") => void, i.e. undefined void(x=43) is an expression representing a value which is undefined and therefore this causes the result of eval to be exactly that. -- 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 .