If you have a Google account, you can save this code to your Google Drive.
Google will ask you to confirm Google Drive access.
Save file as:
If you have saved a file to Google Drive, you can open it here:
The localeCompare method returns a number indicating whether str1 comes before, after or is the same as str2 in sort order.
Click the button to compare the two strings in the current locale.