Victory! (question)


It says that it isn't perfect, and they gave an example of logging both eric and eddie to the console.

I'm wondering why it would log eddie to the console if d, or e weren't in the myName variable?


I actually came here to look to see if anyone had commented on this example, but for a different reason. I don't think it would be a problem that there isn't a 'd' or 'e' in in the myName variable since you are only searching for the first letter. However, I think it would only log ['E', 'd', 'd', 'i'] since we are only pushing the number of letters in the myName variable to the log.


Agreed. I tested it and you are 100% correct