Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Implement a Callback

Richard Preske
PLUS
Richard Preske
Courses Plus Student 4,356 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: