Question from the Javascript test

Retrieve a JSON array from a web server using JavaScript.

Hard

My server is set to respond to GET/api/ articles with exactly the following JSON:

[
   { "title" : "Lorem Ipsum", "category" : "News", "author" : "Chuck Norris" },
   { "title" : "Dolor Sit", "category" : "News", "author" : "Bruce Lee" },
   { "title" : "Amet Enebet", "category" : "Sport", "author" : "Ip Man" }
]

Which of the following code(s) will correctly retrieve this JSON array in the finaldata variable from a web browser?

Author: Jean-marie CléryStatus: PublishedQuestion passed 2155 times
Edit
0
Community Evaluations
developer avatar
Obsolete
Benoit
17/09/2024
plus personne ne code comme ça, cette question était déjà obsolète il y a 8 ans
developer avatar
Auteur anonyme
31/10/2024
Les gens de nos jours ne savent plus utiliser XHR ?