nzediegwu1 / words

Write a function called *words* that takes in a string argument and counts the occurrences of each word in the string. The function should return a JSON object showing the words identified, and their occurrences. For example for the input `olly olly in come free`, the output should be **{olly: 2, in: 1, come: 1, free: 1}**

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

words

Write a function called words that takes in a string argument and counts the occurrences of each word in the string. The function should return a JSON object showing the words identified, and their occurrences. For example for the input olly olly in come free, the output should be {olly: 2, in: 1, come: 1, free: 1}

About

Write a function called *words* that takes in a string argument and counts the occurrences of each word in the string. The function should return a JSON object showing the words identified, and their occurrences. For example for the input `olly olly in come free`, the output should be **{olly: 2, in: 1, come: 1, free: 1}**


Languages

Language:JavaScript 100.0%