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

Function howManyLetters

playground.js:233–243  ·  view source on GitHub ↗
(phrase)

Source from the content-addressed store, hash-verified

231// [2, 4, 6, 8, 10, 12]
232
233const howManyLetters = (phrase) => {
234 // counter
235 let result = 0;
236
237 for (const index in phrase) {
238 console.log(Number(index) + 1)
239 result = Number(index) + 1
240 }
241
242 return { result }
243}
244
245// const phrase = prompt('write your phrase')
246

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected