Pergunta de entrevista da empresa ESPN

Write a function to count the number of palindromes in a given string.

Resposta da entrevista

Sigiloso

26 de abr. de 2015

Started off by parsing the string into an array by word using the .split() String function. Then I created a variable to hold the count and looped through each element in the array and compared the original word to the palindrome version of the word (i.e. original == original.split().reverse().join()) and increase the count by one each time the condition was satisfied.