SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the for..in TypeScript operator to access the index when dealing with collections.
var test = [7,8,9]; for (var i in test) { console.log(i + ': ' + test[i]); }
Output:
0: 7 1: 8 2: 9
See Demo