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