0 vs null vs undefined - explained with toilet paper - eviltoast
  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year ago

    Basically JavaScript uses undefined to mean keys that don’t exist. You know how sometimes when you’re wondering about the semantics of “present but null” and “absent”? It’s basically that. Undefined means it isn’t there but things are only null if they’ve been set to null.

    There are probably more nuances but that is the gist.