Pangram checker: Difference between revisions

m
→‎JS Functional: Applied ESLint, tidied.
m (→‎JS Functional: Applied ESLint, tidied.)
Line 1,731:
 
<lang JavaScript>(() => {
'"use strict'";
 
// ----------------- PANGRAM CHECKER -----------------
 
// isPangram :: String -> Bool
letconst isPangram = s => {
let lc0 === s.toLowerCase();"abcdefghijklmnopqrstuvwxyz"
.split(''"")
.filter(c => lc-1 === s.toLowerCase().indexOf(c) === -1)
.length === 0;
 
// ---------------------- TEST -----------------------
return 'abcdefghijklmnopqrstuvwxyz'
.split('')
.filter(c => lc.indexOf(c) === -1)
.length === 0;
};
 
// TEST
return [
'"is this a pangram'",
'"The quick brown fox jumps over the lazy dog'"
].map(isPangram);
 
})();</lang>
 
9,655

edits