complete-javascript-course
complete-javascript-course copied to clipboard
Out first AJAX call doesn't work anymore ! Managed to fix it if you need help.
Hello, in the part of the video of our first ajax calls, ive ran into trouble getting to display data from the API.
While inserting adjacent HTML, we used data.languages[0].name which didnt work at all for me, same for data.currencies[0].name.
I had to change it to : data.languages[Object.keys(data.languages)[0]]
data.currencies[Object.keys(data.currencies[0]].name
Use Object.keys to fix your problem !
I thank you! you helped me solve the problem!