Ad
Arrays
Data Types
Regular Expressions
Declarative Programming
Advanced Language Features
Programming Paradigms
Fundamentals
Strings
Code
Diff
  •  let isPangram =str=>'abcdefghijklmnopqrstuvwxyz'
     .split``
     .every(v => ~str.toLowerCase().indexOf(v))
    
    
    • let isPangram =str=>'abcdefghijklmnopqrstuvwxyz'
    • .split('')// create an array of alphabets
    • .map(v=>str.replace(/\W/g,'')// map the array and check if the input contains all the letters in alphabet
    • // map function should return [true] for every right character
    • .toLowerCase().includes(v))
    • .every(v=>v===true)// if the mapped array contains all true values, then the str is a pangram else not.
    • let isPangram =str=>'abcdefghijklmnopqrstuvwxyz'
    • .split``
    • .every(v => ~str.toLowerCase().indexOf(v))