CodeWars | is Pangram

by Sebastian Kay

JavaScript

function isPangram(string){
  const a = ["a", "b", "c", "c", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
  let num = 0;
  for (i in a){
  	num++;
	if(!string.toLowerCase().includes(a[i])) return false;
  }
  return true;
}

const Test1 = isPangram("The Quick brown fox jumps over the lazy.");
const Test2 = isPangram("The Quick brown fox jumps over the lazy dog.");

console.log(Test1);
console.log(Test2);