Is there a shorter and simplified version of casting a declaration variable inside of "for of" loop.
let array1: Array<String | Number>;
for (let a of array1) {
let ab: String = <String>a;
}
I am aware casting the whole array would work, but tbh i would feel much more happy if i could either cast or set the datatype of declaration variable "a" instead of casting the whole array, Is something like that possible?
if i type
let <String>a or let a:String it doesn't work.