JavaScript Collections - Iterations and Destructuring
Iteration
let x = [1, 'b', a => a + 1];
x.length = 6;
for(let i = 0; i<x.length; i++){
console.log(`x: ${x[i]} of type ${typeof(x[i])}`);
}
Output:
in iteration
The in keyword skips the undefined entries
//i here takes the index values
for(cons...
asdsyd.hashnode.dev2 min read