var s1 = "World"; var s2 = "Hello"; console.log(s1.localeCompare(s2)); console.log(s1.localeCompare('Z')); console.log(s1.localeCompare('World'));