Flash Lite 2.x and 3.0 ActionScript Language Reference

< less than operator

expression1 < expression2

Compares two expressions and determines whether expression1 is less than expression2; if so, the operator returns true. If expression1 is greater than or equal to expression2, the operator returns false. String expressions are evaluated using alphabetical order; all capital letters come before lowercase letters.

Operands

expression1 : Number - A number or string.

expression2 : Number - A number or string.

Returns

Boolean - The Boolean result of the comparison.

Example

The following examples show true and false returns for both numeric and string comparisons:

trace(3 < 10); // true 
trace(10 < 3); // false 
trace("Allen" < "Jack"); // true 
trace("Jack" < "Allen"); //false 
trace("11" < "3"); // true 
trace("11" < 3); // false (numeric comparison) 
trace("C" < "abc"); // true 
trace("A" < "a"); // true