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