JavaScript AJAX Basics (retiring) AJAX and APIs Displaying the Photos


I don't understand what data.items is. Could someone explain it to me?

1 Answer

Joe Dodd
Joe Dodd
Front End Web Development Techdegree Graduate 15,203 Points

Listen to what he says at 3:00, that data is an object. Objects have properties and in this case items is a property on the data object. So, data.items is the items property on the data object being passed into your jQuery .each method callback. Does that help?

I get it now. I thought at first it was a variable that I didn't see get defined elsewhere.