Answers for "localecompare javascript"

-1

localecompare javascript

const a = 'réservé'; // with accents, lowercase
const b = 'RESERVE'; // no accents, uppercase

console.log(a.localeCompare(b));
// expected output: 1
console.log(a.localeCompare(b, 'en', {sensitivity: 'base'}));
// expected output: 0
Posted by: Guest on April-29-2020
-2

localecompare javascript

so sanh string
Posted by: Guest on June-05-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language