JavaScript Objects The Strings Object- localeCompare() - Javascript Objects

What is JavaScript String - localeCompare() Method?

JavaScript String - localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sorted order.


The syntax of localeCompare() method is as follows -


localeCompare first :-1

localeCompare second :1

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Javascript Objects Topics