Ad
Code
Diff
  • const wordCount = s => s.split(/\s/).filter(v=>!!v).length
    
    • const wordCount = str => str.split(" ").filter(a=>!!a).length
    • const wordCount = s => s.split(/\s/).filter(v=>!!v).length