Compare Revisions

String.prototype.localeCompare()

Revision 87800:

Revision 87800 by evilpie on

Revision 331079:

Revision 331079 by edorivai on

Title:
localeCompare
localeCompare
Slug:
JavaScript/Reference/Global_Objects/String/localeCompare
JavaScript/Reference/Global_Objects/String/localeCompare
Tags:
"String Methods"
"String Methods"
Content:

Revision 87800
Revision 331079
t68alert('a'.localeCompare('b')); // -2t68alert('a'.localeCompare('c')); // -2
69alert('b'.localeCompare('a')); // 269alert('c'.localeCompare('a')); // 2
70alert('b'.localeCompare('b')); // 070alert('a'.localeCompare('a')); // 0

Back to History