Subj : Re: Value of Assignment Expression...
To : netscape.public.mozilla.jseng
From : Martin Honnen
Date : Wed Feb 02 2005 03:18 pm
sukhisoul@yahoo.com wrote:
> The testers in my team are complaining that the following test
> case fails:
>
> var b=8;
> var c, r ;
> var a=2;
>
> r = delete(c=a + b);
>
> document.write("
" + c + "
");
>
> The trouble seems to be that the value of c after delete
> statement is "undefined" when they expect it to be 10. For once,
> I have to agree with them, since the standard says that when
> evaluating expr. c = a + b, c should get the value of 10(=a + b) and
> delete should also receive the value of right hand operand ie. 10.
I think there was a bug causing the problem, see
but that is fixed in 1.7.5 and Firefox 1.0 and with those browsers c is
indeed 10 for me here.
--
Martin Honnen
http://JavaScript.FAQTs.com/
.