Use strict. No, I don't see anything critical that strict would have caught in this instance, but the only benefit of intentionally omitting it is the saving of a few keystrokes. The cost is missing the information it often offers.
Comment out lines 5 through 17 and run your code again. Look for any variation from the output you show here. Think about what that implies.
You've been offered the tools to learn how to do this yourself; you've been given solutions to most of the many questions you've asked en route to this one. Please consider either using these gifts to good effect... or hire a programmer.
Comment on Re: Ref: How can I count the number and kinds of letters at 1st, 2nd and 3rd positions of 3-letter words in a string?