# Challenge #1 Grid: SOLVED

#8

Do we just hit solve after writing the function?

#9

I think the instructions are misleading. It says to write a function named countRows, but when I wrote the function and put the code inside, it didn’t work. It only worked when I didn’t define the function, and just kept what I initially put inside the function.

#10

Correct. Hit solve and the code should run. You’ll get a prompt that reads, “Congratulations! You solved the challenge. Your next challenge unlocks tomorrow.”

#11

Why do I feel like this is some sort of crazy math question that is written in a language that I do not understand?

#13

So this has something to do with the array feature “.length” but damned if I know how to actually make it work.

#14

Been trying this for over an hour now feeling pretty stupid lol

#16

Was also very confused by this. I was also confused by the idea that I didn’t have to pass in the GRID variable but that made sense once I realized you don’t actually write a function in the traditional sense!

#17

YESSSAAAAA Solved it at exactly 11pm. smh

#18

Can someone help me?
When I try to do GRID.lenght

#19

For anyone unable to complete the day one challenge, here’s the hint we posted to our Twitter page: “Return Length of GRID array.”

#20

I finished my challenge yesterday at around 11 pm, but I received a reminder today to complete the challenge, did I do something wrong?

Finished the first challenge at 9pm PST last night but got an email saying I didn't complete it in time
#21

I felt the same way…even had a good cry thinking that this maybe was not for me. Pity party over, pumped about feeling slightly less moronic today. Dare to dream, right?!

#22

Every single time I insert length in my code, it tells me that it cannot read the proporty Length of undefined

#23

some one here on this thread has given the answer away… look carefully and change a few code on it. You should have it!

#24

do you think its probably because of typo - “length”?

it is capital letters but may be missing a colon like such —
= GRID.length;

you also need to “return an array”

#25

I tried with and without capitals letters and it didn’t work

#26

Cannot figure this out. I’ve gone through all the relevant pages on the WS3 site and tried the verbatim solution given in this thread, plus modifications to it, but I’m stumped. Has anyone found any other helpful websites for learning how to do this?

I’m assuming that it’s something with GRID.length, but nothing is working for me.

As an aside, is there any feedback when you hit “Solve” if you’re wrong, or only once it’s correct? I’m asking because nothing happens when I hit “Solve” and I don’t know if the page is just being buggy for me.

Thanks!

#27

try this

countRows = ()=> {

return GRID.length;
};

#29

Thanks for the assistance. I really appreciate that you took the time!

I tried that and it didn’t quite work, but for the first time since the Challenge started, I finally got feedback on my code when I hit “Solve” (i.e. it said it ran, but wrong result, or it didn’t run, etc.). Previously I had no feedback at all when hitting “Solve”. I used the same code I’d tried on the first day today, and this time it was successful, so I think that it was a system error and that nothing was being recognized, regardless of correct/incorrect.

#30

Hey!

Here are some useful links with information specifically about the first challenge:

https://www.welookups.com/js/js_functions.html