[solved] Help with the Wikipedia project?

[solved] Help with the Wikipedia project?
0.0 0

#1

I’m having trouble with the success function:

    success: function(data) {
      for(i = 0; i <= 5 i++) {
      var callData = data.query.search[i].title;
      // $("#results").html(JSON.stringify(callData));
      console.log(data);
      }
    }

As you can see from my codepen, this only prints the title of the last element of the search array, and I’m trying to print all of the titles. I’m not sure what I’m doing wrong.


#2

Using .append() instead of .html() fixed the problem.