Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export const isPangram = (text) => {
- let alphabet = "abcdefghijklmnopqrstuvwxyz";
- let regex = /\s/g;
- let lowercase = text.toLowerCase().replace(regex,"");
- for(let i = 0; i < alphabet.length; i++){
- if(lowercase.indexOf(alphabet[i]) === -1){
- return false;
- }
- }
- return true;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement