coding-challenge-1-easy

Given a string, write a program that counts the number of words that begin and end with the same letter.

ex: "Trout like to eat toast when they see a kayak" would return the number 4 (trout, toast, a, kayak)

written in Javascript