I'm currently working with a code snippet that looks like this:
const words = ['apple', 'banana', 'zoom']
words.sort((first, second) => {
const a = first;
const b = second;
return a == b ? 0 : a < b || a == null ? -1 : 1;
While this code functions properly in desktop Chrome browsers, I've noticed that it sorts the opposite way in mobile Chrome browsers.