Node:Counting Exercise, Previous:recursive-count-words, Up:Counting Words



13.3 Exercise: Counting Punctuation

Using a while loop, write a function to count the number of punctuation marks in a region--period, comma, semicolon, colon, exclamation mark, and question mark. Do the same using recursion.