Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save inspector-ambitious/66ac4fce9739c2631a6902c59c923a1f to your computer and use it in GitHub Desktop.

Select an option

Save inspector-ambitious/66ac4fce9739c2631a6902c59c923a1f to your computer and use it in GitHub Desktop.
// Step 1: Create a function that will return the number of words in a text
const countWords = (text) => {
}
console.log(countWords(""));
console.log(countWords(" "));
console.log(countWords("JavaScript!!! "));
console.log(countWords(" JavaScript"));
console.log(countWords(" JavaScript is cool "));
console.log(countWords("I like to learn JavaScript with codeguppy"));
// Step 2: Create a function that render the statistics to HTML
const renderCharFrequency = (rootEl) => {
};
renderCharFrequency(document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment