I have the following function:
function createLogos() {
for (var l=0; l<userList().length; l++) {
var username = "https://api.twitch.tv/kraken/users/" + userList()[l];
$.getJSON(username, function(data) {
$(":eq(l)").append("<img src=" + data.logo +">");
});
}
}
However, the eq(l)
is not recognising what l is. Replacing it with a number and it works as to how I wish.
Can anyone see why it might be behaving like this?