Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string comparison javascript

string1.localeCompare(string2);
//returns postivie number if string1>string2
//returns negative number if string1<string2
//returns 0 if they are equivalent
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #string #comparison #javascript
ADD COMMENT
Topic
Name
1+1 =