You are viewing a single comment's thread. Return to all comments →
My JS solution with ASCII char code approach
const pangrams = s => { const string = s.toLowerCase().replace(/ /g, ""); const charCodeArr = [...new Set([...string].map((_, i) => string.charCodeAt(i)))].sort((a, b) => a - b); for (let i = 97; i <= 122; i++) { if (!charCodeArr.includes(i)) return "not pangram"; } return "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 →
My JS solution with ASCII char code approach