JS-Index of for-of Loop

In ES6, loop with for-of is very convenient, but the only drawback is the missing index. But we can leverage array interator and destructuring to get looing index for us.

for(let [iIndex,oSelected] of aSelected.entries()){

}


Comments