let [x,y] = [10,20] [y,x] = [x,y] console.log(x,y)
its not working as expected it gave me the error...
Uncaught ReferenceError: Cannot access 'y' before initialization
let [x,y] = [10,20];//using semicolon here [y,x] = [x,y] console.log(x,y)
now its working please anyone can explain me why its working now..`
Via Active questions tagged javascript - Stack Overflow https://ift.tt/YS51VwD
Comments
Post a Comment