Conditional statements

The following example returns true if the date entered is within the number of days in a month (here, 30 days); otherwise, it returns false.

Note Note the use of the conditional statement to shorten the "if" expressions. The var return = (parm.Date.getDate <= 30) ? true : false; statement works in the same way as its much longer equivalent:

var result=false;
if (parm.getDate()<= 30)
{
result = true;
}
else
{
result=false;
}