Solution: TypeScript Basics
Review the solutions to the challenges discussed in the previous lesson.
We'll cover the following...
Solution: Convert JavaScript to TypeScript
Both solutions involve using the any
type.
-
In Solution # 1, the variable
item1
is explicitly given a type ofany
, allowing it to accept any kind of value. -
In Solution # 2, the type assertion
<any>
is used to indicate ...