JSFiddle - React, Tailwind, and code Playground

by rdwettlaufer

JavaScript

var challenge = function(sentence) {
    var ret = {};   
    _.map(sentence.toLowerCase().replace(/[^a-z]/g,'').split(''), function(c) {
        if (ret[c]) ret[c]++
            else ret[c] = 1;
    });
    if (_.size(ret) !== 26) return false;
    return true;
}
console.log(challenge("The quick brown fox jumped over the lazy dog."));
console.log(challenge("The quick brown fox jumps over the lazy dog."));
console.log(challenge("Pack my box with five dozen liquor jugs."));
console.log(challenge("Saxophones quickly blew over my jazzy hair"));