MCPcopy Create free account
hub / github.com/CleverProgrammers/JavaScript-Course-by-Clever-Programmer- / wordFrequency

Function wordFrequency

playground.js:306–309  ·  view source on GitHub ↗
(phrase)

Source from the content-addressed store, hash-verified

304
305// wordFrequency('lol what lol') 👉 {'lol': 2, 'what': 1}
306const wordFrequency = (phrase) => {
307 const words = phrase.split(' ')
308 return letterFrequency(words)
309}
310
311// const userInput = prompt('Write your sentence')
312// console.log(wordFrequency(userInput))

Callers

nothing calls this directly

Calls 1

letterFrequencyFunction · 0.85

Tested by

no test coverage detected