Compare two values.
Syntax
Parameters
term1 - The first term.term2 - The second term.method - Sort method options.0 (default) - Compare items using standard comparison.1 - Compare items numerically.2 - Compare items as case-sensitive strings.3 - Compare items as case-insensitive strings.4 - Compare items as case-sensitive strings, using natural ordering.5 - Compare items as case-insensitive strings, using natural ordering.6 - Compare items as case-sensitive strings, according to locale.7 - Compare items as case-insensitive strings, according to locale.length - Determines how many of the characters from each String will be used for comparison.
Result
0 - A Number less than 0 is returned if term1 is less than term2.0 - A Number less than 0 is returned if term1 and term2 are equal.0 - A Number greater than 0 is returned if term1 is greater than term2.
Returns a Number signifying which of the two terms being compared is greater.