I have to do assignment:
Return the number of times that the
string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
countCode("aaacodebbb") → 1
countCode("codexxcode") → 2
countCode("cozexxcope") → 2
I'm not sure exactly how to find/extract the
word "code" out of a string. Do I use substring?
Thanks!