Welcome to the Treehouse Community
Looking to learn something new?
I'm not sure what i'm doing wrong with this code. It evaluates as expected but I am getting a Task 1 failed error.
Although indexOf does work and you are not wrong it seems the code challenge does not like it, this does work:
Yeah i've tried about every option I can think of...still nothing :( If it helps at all I am getting an object null value. I think the script is the prompt variable is getting destroyed everytime I recheck my work which is resulting in a reoccurring error.
Thanks so much :) Guess I was trying too hard haha.