for

Available in ES 2009.
This only works on arrays.


for (i=0; i < total; i++) { 
}


const MyMap = new Map() 
   .set(10, 'text 1')
   .set(20, 'text 2')
   .set(30, 'text 3');
const MyArray = [ ůMyMap];
for (let I = 0; I < MyArray.length; i++) {
   const [id, name] = MyArray[i];
   // do something
}


© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext