Learn Fetch and Promises by Building an fCC Authors Page - Step 3

Tell us what’s happening:

Describe your issue in detail here.

fetch('https://cdn.freecodecamp.org/curriculum/news-author-page/authors.json').then=(response) => {
    console.log(response)
    return response.json()
  }

i need to chain then()to fethc with reponse and console.log to response after that it seems to not be passing

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Fetch and Promises by Building an fCC Authors Page - Step 3

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hi @email2shaheer

Chain the .then() method to your fetch call. Inside the .then() method, add a callback function with res as a parameter, then log the res to the console so you can see the Response object. Open your console and expand the Response object to see what it contains

Inside the .then method the callback function needs to be res as a parameter, your code has response
Still inside the .then method, add the console log - make sure to use the correct parameter.

Check the code is correct by viewing the console.

The return statement is not needed, so delete that line.

Happy coding

you don’t use the equal sign where calling a function

fetch('https://cdn.freecodecamp.org/curriculum/news-author-page/authors.json')
  .then(res=>{console.log(res)}) 

not passing now it says to pass res in conole.log which i did i think

removes the {} from the function

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.