Why is `return res.json(reponse)` undefined?

The code says the return res.json(reponse) from the post request should say ‘hello’, but it does not, instead it says ‘undefined’, what am I doing wrong?

Thanks for your time


Your browser information:

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

Challenge: American British Translator

Link to the challenge:

it seems the code you posted doesn’t match your question, maybe you want to provide a different link

Aaahh! I see what you mean, I pasted the link to the sudoku solver instead of the translator!

I’ve fixed this now

Thanks for your time


I have found the solution by looking at a previous project

When return res.json() is run the index.js file searches for the word ‘translation’, so I needed to include an object with the key ‘translation’ for this to work

1 Like

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