HMA WebDesign

What will be the output of following JavaScript code?
#JavaScript

7 months ago | [YT] | 5



@AlexDraconian

Error since same variable declared more than once using let.

7 months ago | 1  

@Ayush...ji....03

2

7 months ago | 1  

@Lonelymorales

It will result in a infinite loop as becoz the same variable is redeclared inside the same loop and each time the loop runs it starts with the same value of 1 becoz in each loop iteration it is redeclared with 1 which will lead it to infinite loop only as the value is still the same so this is what will go on . Do reply that I am correct or not ?

7 months ago (edited) | 1