I previously had a .forEach
loop set up:
myMap.forEach((val: object, key: number) => {
console.log(val)
})
Now, I need to include a continue statement which means reworking it into a for loop:
for (let [key, val] of myMap.entries()) => {
console.log(key)
console.log(val)
if (something) continue
}
Can someone demonstrate how to define the types for the tuple in the for loop?
This Typescript Playground has been quite useful.