Twitch Tv Project Last Glitch , Kindy guide

Hi, thanks to the forum support i am now getting all the live streams by checking - !== null, my code pen link here …

But when i try - === null and display accordingly , its not working can you guys please tell me where am i doing wrong … Thanks

If is null you’ll get an error on:

var logo =;

and following lines just aren’t executed.

1 Like

@jenovs - thanks for having a look at the code, as you can see even if i do not use logo , i use this condition for stream to be null -

else if( === null){

it does not execute, why is the control not reaching else if, is there any other closure like concept here also ?

Kindly guide …


If you don’t use logo there are still status and name which will fail.

@jenovs - i am not using any i am just trying to get a console print out, still no result, is there something wrong with - if ( !== null) because of which the control never goes to if ( === null)

Works for me:

@jenovs, the thing is if you do any thing in the first part of if statement it is working but not in the other part of else if, so the null part works if it is first but if it is in else if part it will not work and vice versa

Still works:

@jenovs - thanks a lot , i copied the - var logo =;
var status =;
var name =;

inside the if () and it works well…

Seems the concept of closure at work again accessing there values and stop the loop as you said above , i have been working on other languages hence finding it hard to understand variable scope in javascript …

Thanks so much for your time …