You are viewing a single comment's thread. Return to all comments →
JavaScript Solution using map
process.stdin.on("end", function () { var map = {}; var sum = 0; for(let i = 0; i < input.length; i ++){ var value = input[i].toLowerCase(); if(value === " ") continue; if(map[value] !== undefined) continue; map[value] = 1; sum ++; } console.log(sum === 26 ? "pangram" : "not pangram"); });
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
JavaScript Solution using map