I just need a function for counting a given word in a string. There is something that has to do with split but I cant get what I should do from then. Thank u for your time.
preguntado el 08 de noviembre de 11 a las 14:11
After splitting by the word, just take the length of the resulting array and subtract one.
What programming language are you doing this in?
As I don't know in which programming language you want to do this.
You can take a look what its doing by clicking 'Try this example' button.
There is word count, replace and capitalize.You just need the wordCount() function.