Magoo Component UI logo Magoo Component UI
← Catalog

Course Discussion Thread

discussion-thread-edu organism experimental

A course Q&A thread with a question and voted answers, flagging instructors.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Why does typeof null return "object"?

Asked by Sam · 2 days ago · 2 answers

  • 12
    AR Alex Rivera Instructor

    It's a long-standing bug kept for backwards compatibility with early JavaScript. It won't be fixed to avoid breaking the web.

  • 4
    PN Priya N.

    To add: you can check for null explicitly with `value === null`.

Props

NameTypeReq
question string ✓
asker string ✓
answer_count string
answers array ✓

Use cases

list-item WCAG AA SEO 45 dir: both ai-generated