Twitchtv(need help!) please review

i’m unable to output the names of the offline channels by arr[] or is just showing undefined

when running your code I get a 400 status error for making the twitch API calls.
In the project’s page in FCC, there is an update saying to choose a different url to make API calls,

Using the url you chose requires an API key which I am not sure you have signed up for.
Try using the url in the project’s page.

I would highly suggest to look into Twitch’s documentation as well,

Best of luck.

i’ve removed the id on purpose its not the url’s fault. i just didn’t want it to be used by others. Also its not the url’s fault as if the channel is offline it won’t br returning data hence no channel name and that’s where the problem lies because i’m unable to display the offline channel’s name by using array also.

If you comment out:

      headers: {
        "Client-Id": "" //i've removed the client id for now

and use the recommended url:

url: "" + arr[i],

then you will get results and not the “error” alert.

BTW - don’t use alerts for debugging purposes, because they are very annoying and require clicking OK for each one. Use console.log statements instead.

Also, since you do not show the id, I can not test to make sure it is not a problem. You might want to double check if the header property should be “Client-Id” or “Client-ID”.

thanks for your reply. i took your suggestion but it is still not working . i am unable to display the offline channel’s name