3 ms·
Well, you can pass the strings through .toUpperCase() before comparing them. Or indeed drop the <, > based approach and use: https://developer.mozilla.org/en-U
by amelius 7y ago
Well, you can pass the strings through .toUpperCase() before comparing them.
Or indeed drop the <, > based approach and use: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Or: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...