Javascript supports what they call, the trenary operator (hopely called it
right).
var result = comparison ? true value : false value;
So you can do
if(a == b){
return true;
}else{
return false;
}
or
return a == b ? true : false;
or for the diehard javascript lovers.. *wink* comparisons with regular
expressions.
if(/abc|def/i.test(string)){
}
Where you test for the existence of abc OR def in string, with the modifier i
to ignore case.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware: a new and convenient web-based time tracking application. Start
tracking and documenting hours spent on a project or with a client with Logware
today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191568
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54