string compare in javascript

Developer from somewhere

"string".localeCompare("other_string");