Assignment 5, splitting fetch between myFetch and listedPlanetsResponse is messing me up

When calling myFetch in the script file, do I give it a parameter? I cannot figure out how to get the json file to load when it’s split between the two. If I put all the info in myFetch(), it’s fine. But that’s not what we’re asked to do. Help please.

Amy

Hi Amy, not sure if you’ve solved this already, but I didn’t put a parameter into myFetch() when I called it in script.js. I just did let listedPlanetResponse = myFetch();

I totally get what you mean about splitting it over two functions. That confused me at first, too. If you look at the starter code they provide - you need to get your PickPlanet() function to pick a planet from one of the many planets you’ve just fetched (which is stored in the listedPlanets variable).

I hope that gives you a start.