Overview
Syllabus
Intro
Welcome
Type Assertions vs Type Casting
What are Type Assertions?
Starter Code
Converting Types with Assertions
Angle Bracket Syntax instead of "as"
Narrowing Return Values with Assertions
Caution: Assertions allow mistakes!
Double Casting and the unknown type
DOM Selection Types
Non-Null Assertions
Angle Brackets and the DOM
Student Challenge
Solution 1: Beginners
Solution 2: Type Assertion
13:50 Syntax error: document.getElementById'img' is what is needed if the element has an id set to "img". This does not change the concept I'm discussing. Just tired eyes and a syntax error.
Taught by
Dave Gray