2

Could you tell me what this i means after the comma. I am struggling to understand this syntax or even find it in the internet.

let i;
this.questions = document.querySelectorAll('.question'), i;

i is not used anymore in the function

If setting a debugger after this lines. i is undefined

Rafael López Martínez
  • 2,225
  • 2
  • 15
  • 23

1 Answers1

0

It doesn't seem to be of any use indeed.

As an information, it's just to declare / instantiate your variables. Take a look :

let i, j;
j = 1, i = 2;
console.log(i, j);