The optimum way to compare strings in JavaScript

There is method by which we can compare the two strings i.e, String localeCompare() method. This method compares two strings in the current locale. The current locale is based on the language settings of the browser. This method returns a number that tells whether the string comes before, after, or is equal to the compareString… Continue reading The optimum way to compare strings in JavaScript