37. Pangrams

The sentence 'A quick brown fox jumps over the lazy dog' contains every single letter in the alphabet. Such sentences are called pangrams. You are to write a program, which takes a sentence, and returns all the letters it is missing (which prevent it from being a pangram). You should ignore the case of the letters in sentence, and your return should be all lower case letters, in alphabetical order. You should also ignore all non US-ASCII characters.In case the input sentence is already a pangram, print out the string NULL

by Donal Devine

HTML

<div id="divConsole"></div>

CSS

.console-output
{
    font-family: monospace;
    margin: 1px;
}

JavaScript

console = {
    log: function (s) {        
        divConsole.innerHTML += 
            "<p class=\"console-output\">" + s + "</p>";
    }
};


var foo = function(s) {    
    var d = [];
    for(var i = 0; i <= 24; i++){
        x = i + 98;
        d[i] = "".fromCharCode(x);
    }
    
    console.log(d[0]);
    console.log(d[1]);
    
    var arr = s.toLowerCase().split('');
    
    arr.forEach(function(b, i){ 
        d.splice(d.indexOf[b], 1);
    });
   
    return d.join('');
};



var a = "A quick brown fox jumps over the lazy dog";

console.log(foo(a));

//console.log(foo("A quick brown fox jumps over the lazy dog"));
//console.log(foo("A slow yellow fox crawls under the proactive dog"));