Posts by kioterd • 69 points
1 post
-
6
votes4
answers3540
viewsQ: How to count occurrences of a letter in a sentence?
I’m trying to do an exercise whose goal is to know how many times a certain letter appears in the sentence, I was trying to do so: var frase = "o homem é o lobo do homem"; var letra = "o"; for (var…