A pangram is a sentence that contains all the letters of the English alphabet at least once. It’s a fun challenge to write one, but it’s also useful in a variety of applications. For example, if you’re designing a typeface and language testing, it’s important to see how it would look in a variety of contexts.
Setting Up Our Algorithm
My solution
In this solution, I will use indexOf Method
The JavaScript indexOf() method is used to search for an element in an array and return its index number. It will return -1
if the element is not found. The syntax for the indexOf() method is indexOf(element
). The indexOf() method is case-sensitive, meaning that A
does not equal a
.
This function will take in a string as a parameter
Make Array Alphabet String using .split()
Find X Index in String Parameter.
If the return value is -1, String doesn’t have All Alphabet.