Understand Kotlin's powerful type inference capabilities and how to use them to write more succinct code.
Type inference is a compiler feature that allows you to omit types in your code when the compiler can infer it for you.
Kotlin’s compiler can infer the types of most variables, so adding the type is optional:
Create a free account to view this lesson.
Learn to code, grow your skills, and succeed in your tech interview