Problem with challenge 7


Problem with challenge 7

Hello, I believe there was a problem with challenge 7. Yesterday I ran wrote my code and ran it on my pc with nodejs and it worked fine i got the correct results. isRock('D1') and isRock('B10') returned true as well as every other cell with a ‘^’ in it and returned false accordingly also. But when I transferred the code to the website and ran it, it said my result was in correct.

Pseudocode of what i wrote inside isRock(cell):
       if lightCell(cell) is equal to "^":
         return true
         return false;

I ran this and it didnt work, but then today I ran it the opposite way, (also the wrong way) just for fun

       if lightCell(cell) is equal to "^":
         return false
         return true;

and it worked, I was told its correct and its been solved. Also because of this I can’t do today’s challenge.


I experienced the same issue.

const is_rock = lightCell(coordinate) === rock ? true : false;

The really funny thing is, I utilized the same logic (i.e. essentially the same code for Day 8’s challenge, and everything went through!



FYI, you don’t need to do an if/else or ternary statement. lightCell(cell) === "^" should evaluate as true or false, so you can return it directly.


Thanks so much for the information! This has been reported to the development team.