Challenge 7 problems


#1

I’ve done similar to what was mentioned in the forums (ie using return result of lightCell === “^”) but it’s not working…

I’m not sure what I’m not doing correctly.


#2

what you have here looks alright. Can you give more information? What is the error you are seeing? Are you getting anything in the console?


#3

It says that my code couldn’t run. Invalid token…


#4

I’ve been having the same issue, I’ve been stuck on it for days. I keep receiving the error:

Your code could not run: “Cannot read property ‘2’ of undefined”


#5

I had an issue where I was confusing the order of columns and rows. Once I swapped their order my code was working.

That said, can you post your lightCell(), isRock(), and any related functions to better understand what is happening?


#6

There might be a punctuation error. Check your quotation marks. Are they curly (“^”) or straight ("^")? Javascript will only recognize the straight quotes.


#7

rockbeckerton is probably correct but if that isn’t the case, I’d suggest checking your brackets or for accidental punctuation


#8

Did you call the lightCell function?
e.g. lightCell('B3') == '^';


#9

How is your lightCell function reading in the coordinate? Can it read double digits (i.e. A10)?


#10

@matsuko is right. The lightCell() needs to be called on a coordinate in order to return true or false (i.e. lightCell("B3") === "^";).

You’ll have to think about the double digit scenario and JavaScript indexing…but since it’s already day 18 of the 21 day challenge, have a look here for some clues.