Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJustyn Jackere
561 PointsWhy do I get this particular "unreachable statement" error?
It seems like the error has to do with my line of code containing the boolean variable "Notile".
Any help in finding a solution to this problem is greatly appreciated. Thank you in advance. :-)
2 Answers
Justyn Jackere
561 PointsTo solve the challenge, I deleted the return value of false and replaced it with this: return.tiles.indexOf(tile) != -1;
Steven Parker
231,271 PointsYou'd need to show your code to make a precise answer possible, but one way to cause an "unreachable statement" error in a function (or method) is to have statement(s) after a "return" statement.
Justyn Jackere
561 PointsSteven, Thank you so much. I really appreciate your help. Luckily, I found the solution to complete the challenge while reading a 2 year old post regarding the same code challenge. :-)
Steven Parker
231,271 PointsDid I guess it? And yes, there's quite a wealth of information in the archives. Good job discovering it.
Steven Parker
231,271 PointsSteven Parker
231,271 PointsBut we didn't see what you were deleting it from.