var b:Boolean = condition1() && condition2();
In this statement, if condition1() evaluates to false, will condition2() be evaluated?
var b:Boolean = condition1() && condition2();
In this statement, if condition1() evaluates to false, will condition2() be evaluated?
Yes. The && operator (and also ||) is short-circuited.
This has been explained in http://192.150.14.22/livedocs/flash/9.0/ActionScriptLangRefV3/operators.html#logical_AND.
Returns
expression1if it isfalseor can be converted tofalse, andexpression2otherwise. Examples of values that can be converted tofalseare0,NaN,null, andundefined. If you use a function call asexpression2, the function is not called ifexpression1evaluates tofalse.
A little googling indicates yes. Also, the usual term is short-circuited, rather than lazy.