Log In
0% completed
All Lessons
Free Lessons (10)
Introduction
What is TypeScript?
TypeScript Philosophy
Why Use TypeScript?
Using TypeScript
The Basics of Variables
Declaring a Variable
Declaring Types in Untyped Code
Hoisting Variables
TypeScript Scope is JavaScript Scope
Switch Scope
The Multiple Methods of Declaring a String
String-Tagged Templates
What is a Number in TypeScript?
Booleans, Functions, and Objects
Avoiding `any` at Any Time Possible
Mutable and Immutable Arrays
Undefined Versus Null
Returning nothing with Void
The Primitive Type never
Unknown: A Better any
Literal Type to Narrow Primitive Type
Symbol and Unique Symbol
Casting to Change Type
Comment
TypeScript's Comments are like JavaScript's with One Exception
Enum
Enum With and Without Values
Accessing Enum Values
Speeding Up Enum
Merging and Adding Functionality to Enum
Generic Type
Generic
Generic and Classes
Generic Constraint
Generic with Construction Functions
Generic Outside Class
Generic Comparison
Generic Inference
Generic Default
Generic and keyof
Functions
Definition
Named and Anonymous Functions
Function and Inference Variables
Generic Return Type, Optional Parameter and Default Value
Functions in Classes
Function Relationship with "this"
Function and Inference Return Types
Overload Functions to Enrich your Definition
String Literal and Overload Function
Types of Function Headers
Mapped Type
Definition and Usages
Immutable Data with Readonly
Partial
Nullable
Pick
Omit
Record
Extract
Exclude
ReturnType
Custom Mapped Type
Objects
Introduction to TypeScript's Many Objects
The Curly Braces Object
New Object
Lowercase vs UpperCase Object
Index Signature
Definitions and Usages
String or Number Indexes
Members of the Same Type
Keys with Constants and Symbols
Variables Advanced
Intersecting with Types, Interfaces, and Generics
Literal Type, Narrowing, and Const
Union with Types and Tagged Union
Const Assertion for Literal Values
Tuple For Type and Length Arrays
Casting to Change Type
keyof to Validate a Member's Name
On How TypeScript Handles Variance
How to Narrow a Type with the in Operator
What is a Conditional Type?
TypeScript Inference
Set and Dictionary
Exception
Creating an Exception
Catching Synchronous Exceptions
Catching Asynchronous Exceptions
Assertion Functions
Alias
Aliases with the Structural Behavior of TypeScript
Aliases with Type
Aliases with Generic Types and Recursivity
The Differences between Type Aliases and Interfaces
Branded Alias
Type Checking
Comparing Variables
Type Checking with typeof
Type Checking with instanceof
Type Checking and Interface with a Discriminator
Type Checking with Intersections
Type Checking an Interface with Custom User-Defined Type Guard
Optional Chaining and Optional Element Access
Nullish Coalescing
Assertion Functions
Iterators
Iterating an Object's Keys with For-In
Iterating an Object with Standard For/While
Iterating and the Asynchronous Loop
Manipulating Objects and Array
Typing an Array
Array with a Skipped Value
Destructuring an Array
Destructuring an Object
The Spread Operator and Arrays
The Spread Operator and Objects
The Bang Operator
Sharing Code
Namespace
Module
Default Module
Lazy Loading Module
Import Shortcuts
Definition Files and Global Definition Files
Definition File Locations
Conclusion
Conclusion
Appendix
Learn TypeScript: The Complete Course for Beginners
/
...
/
Iterating an Object's Keys with For-In
Iterating an Object's Keys with For-In
We'll cover the following...
Iterating an object’s keys with for-in
Iterating an object’s keys with for-of
Iterating with forEach
Iterating an object’s keys with for-in
#
The first way is to iterate the key of an object.
...