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 Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Implement a Callback

Richard Preske
PLUS
Richard Preske
Courses Plus Student 4,355 Points

Something is wrong with arrow function line 31

Here is my code: https://w.trhou.se/vjcavy1qax

On line 31 getting an error because of the arrow function. Not sure why.

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Richard Preske ! Looks like you're doing terrific from where I'm sitting. The culprit is an extraneous closing parenthesis on line 31.

You wrote:

getJSON(astrosUrl, (json)) => {

But that is ending a little prematurely. It should be:

getJSON(astrosUrl, (json) => {

The appropriate closing parenthesis is found on line 35. Remove the extra closing parenthesis and then match up your curly braces and opening closing parentheses going back up and you'll see how they now all match up :smiley:

Hope this helps! :sparkles: