Code QuizAdvanced
Type Guard Missing the Predicate
A helper checks for a string but forgets the type predicate return, so narrowing fails.
Why does `value.toUpperCase()` cause a compile error inside the if block?
A helper checks for a string but forgets the type predicate return, so narrowing fails.
Why does `value.toUpperCase()` cause a compile error inside the if block?