hello :)
I don't understand you question ? why you don't use the if keyword ?
if ( isNaN(x) ) x = 0 ;
you can use the || operator too
function write ( txt )
{
var message = txt || "empty message" ;
trace(message) ;
}
write("hello") ; // output : hello
write() ; // output : empty message
if you use the cond?true:false operator to return a true value... you can
use directly the condition with the object.
if ( myObject )
{
trace("myObject exist !!!") ;
}
myObject is true if is defined and false if is undefined.
EKA+ :)
2007/1/26, Helmut Granda <[EMAIL PROTECTED]>:
does anybody knows if there is any short hand for if statement without the
else statement?
at the moment I am using
object ? true : null;
thanks...
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com