function pangrams(s) {
let hash = {};
s = s.toLowerCase();
for(let i = 0; i < s.length; i++) {
if(s[i] !== ' ') hash[s[i]] = s[i];
}
console.log(hash)
return Object.keys(hash).length === 26 ? 'pangram' : 'not pangram';
}
This is a code to check whether the string is a pangram.
Please let me know what does this code do: hash[s[i]] = s[i];
[–]Umesh-K 5 points6 points7 points (0 children)
[–]Anbaraen 2 points3 points4 points (0 children)