function pangrams(s) { // Write your code here var lowerInput = s.toLowerCase(); var letterArray = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; for(var i = 0, l = letterArray.length; i < l; i++) { if(lowerInput.toLowerCase().indexOf(letterArray[i]) == -1) { console.log('not pangram'); return "not pangram"; } } return 'pangram'; }
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
I think this could be done in simpler way
This works for English alphabet, for others you should change 26 to number of letters in that alphabet.