notice this: once a return statement is met, the function stops and return a value
that means that a value is returned at first iteration of the loop, and only first character is checked
you have if (...) {return false} return true, one of the two will always execute at first iteration and the function stops after checking only first character
Oh thank you so much. It seems so silly now but I went and went over it and couldnt notice. Most of the tests were passed by this code, only one was not and if it hadnt been there I wouldve gotten through with this faulty silly code.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.