I’m trying to loop through an array and print out the names in the array for the Twitch.tv app (have to use the names in the array since the JSON doesn’t provide names for users who are not streaming). Anyway, the counter variable seems to behave in a very wonky way one it gets inside the getJSON function – it gets stuck on 7, so that I can only get the 8th item in the array whenever I call it. Anybody know why this is happening? What do I have to do to get the counter variable to behave when it goes into the new function?
Why is the counter variable getting stuck on one value?
Did you resolve your problem?
Yes – actually I did. It was a hoisting issue. Thanks for asking.