v = v + 4 , z++, v + 6;
trace(v); // output: 4
trace(z); // output: 1
The following example is identical to the previous example except for the addition of the
parentheses () operator and illustrates once again that, when used with the parentheses () operator,
the comma (,) operator returns the value of the last expression in the series:
var v:Number = 0;
var z:Number = 0;
v = (v + 4, z++, v + 6);
trace(v); // output: 6
trace(z); // output: 1
See also
() (parentheses)
, (comma)
47
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers