Find locales that are not supported by both IE and Chrome

Compare the locales that are supported and list the locales supported by Chrome that are not supported by IE, and vice versa.

by David Storey

JavaScript

var chrome = ["af", "ak", "am", "ar", "az", "be", "bg", "bn", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fa", "fi", "fo", "fr", "ga", "gl", "gu", "ha", "he", "hi", "hr", "hu", "hy", "id", "ig", "is", "it", "ja", "ka", "kk", "km", "kn", "ko", "lg", "lt", "lv", "mg", "mk", "ml", "mo", "mr", "ms", "mt", "ne", "nl", "nn", "om", "or", "pa", "pl", "ps", "pt", "rm", "ro", "ru", "rw", "si", "sk", "sl", "sn", "so", "sq", "sr", "sv", "sw", "ta", "te", "th", "ti", "tl", "to", "tr", "uk", "ur", "uz", "vi", "yo", "zh", "zu"].slice().sort(),
    ie = ["af","am","ar","as","az","ba","be","bg","bn","bo","br","bs","ca","co","cs","cy","da","de","dv","el","en","es","et","eu","fa","ff","fi","fo","fr","fy","ga","gd","gl","gn","gu","ha","he","hi","hr","hu","hy","id","ig","ii","is","it","iu","ja","jv","ka","kk","kl","km","kn","ko","ku","ky","lb","lo","lt","lv","mg","mi-Latn","mk","ml","mn","ro","mr","ms","mt","my","ne","nl","nn","no","oc","om","or","pa","pl","ps","pt","rm","ru","rw","sa","sd","se","si","sk","sl","sn","so","sq","sr","st","sv","sw","ta","te","tg","th","ti","tk","tn","tr","ts","tt","ug","uk","ur","uz","vi","wo-Latn","xh","yo","zh","zu"].slice().sort(),
    chromeDiff = [],
    ieDiff = [];
    
for (var o = 0, n = 0; o < chrome.length && n < ie.length; ) {
    if (chrome[o] < ie[n]) {
        chrome.push ( chrome[o++] );
    } else if (chrome[o] > ie[n]) {
        ieDiff.push( ie[n++] );
    } else {
        n++, o++;
    }
}
[].push.apply(chromeDiff, chrome.slice(o));
[].push.apply(ieDiff, ie.slice(n));

console.clear()
console.log(chromeDiff.length + " locales missing from IE: " + chromeDiff);
console.log(ieDiff.length + " locales missing from Chrome: " + ieDiff);