Welcome to my actionscript snippet library!

Actionscript Snips is a small repository of actionscript code that aims to save developers and designers time when developing a website.  

Determine Whether Number is Even or Odd


function isEvenOdd(num):String {
if ((num % 2) == 0) {
return "even";
} else {
return "odd";
}
}

trace(isEvenOdd(2)); //Outputs even
trace(isEvenOdd(7)); //Outputs odd

0 comments:

Post a Comment