Unknown vs Any Quiz
Multiple Choice Medium
Question
Why is `unknown` considered safer than `any`?
Hint
With any, you can do anything. With unknown, you must narrow first.
Explanation
unknown is a type-safe counterpart of any. While any lets you perform any operation without checking, unknown requires you to narrow the type (via type guards or assertions) before using it. This prevents accidental unsafe operations while still accepting any value.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.