Answers for "how to loop through a array in array in type script"

72

javascript code to loop through array

var colors = ["red","blue","green"];
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}
Posted by: Guest on July-22-2019
-1

create an array for looping typescript

loopTimes: number[] = Array(31);

for (let x = 0; x < loopTimes.length; x++) {
    console.log('Index/Loop No: ', [x]);
    // Do something here...
}
Posted by: Guest on July-16-2020

Code answers related to "how to loop through a array in array in type script"

Code answers related to "Javascript"

Browse Popular Code Answers by Language