letblogName:string="typescript";//Iterate over setfor(letcharacterofblogName){console.log(character);//t y p e s c r i p t} 3. Do not use ‘for..in‘ loop to iterate through an array Thefor..inloop in JavaScript and TypeScript is designed to iterate over the properties of an ...
it is the keys on the object you are passing. The TypeScript type system is structural, so you could have something like: interface MyObj { name: string; } function f(o:MyObj) { for(var x in o) { } } f({"name" : "value"}); // x is string f({name: "", [Symbol....