Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects The Student Record Search Challenge Solution

What I did wrong?

Hi, what I did wrong, I copied almost everything from this video and it's not working. https://w.trhou.se/krfx7ziu9h

Remi Vledder
Remi Vledder
14,144 Points

Can you provide more context? Where are you copying it to? And what are you trying to achieve?

Remi Vledder
Remi Vledder
14,144 Points

Can you perhaps replicate the issue you're facing here: https://codesandbox.io/dashboard

That way I can help you with debugging.

2 Answers

It is a challenge form Java Arrays and Objects course (The Student Record Search Challenge). I did almost everything like in the video but it is not working. The program suppose to take informations about each student you type in an alert windox and write it on a page.

Tomasz Grodzki
Tomasz Grodzki
7,705 Points

Kod działa dobrze, kilka detali musisz zmienic:

W kilku miejscach zamiast 'answer' masz 'asnwer' W 27 linijce kodu masz błąd ze składnia. Porownanie w JavaScripcie robimy potrójnym znakiem równa się. Ty masz pojedynczy. Pozdro :)

Shumin Zhou
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Shumin Zhou
Full Stack JavaScript Techdegree Graduate 31,489 Points

The problem is seems like on line 35,at this points it's no need print(message),because it's already exists inside the for loop.just try to deleted the print(message) on line 35,it probably will fit the issued

Tomasz Grodzki
Tomasz Grodzki
7,705 Points

35th line isn't the only problem. The problem is also in 27th line - there is a syntax problem with single equal sign. There's also a few typo, in one place he wrote 'answer' and in another place 'asnwer'.