• jedibob5@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    1 year ago

    It does some funky things with type coercion and comparison which I don’t particularly like, but I generally understand why it does things that way.

    A lot of the weird quirks of JS come from the desire to avoid completely blowing up and crashing as much as possible, which makes sense in a web dev context. Forcing weird operations to at least return something can prevent an unhandled error state in a single component from causing an entire page to crash, even if that component ends up malfunctioning as a result.