• propter_hog [any, any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    3 days ago

    Precisely. This exact situation from the comic would happen in Java, too, except it complains when you subtract an int from a string. JavaScript was merely designed to minimize errors (since a web browser takes the place of the compiler, and random strangers visiting your site shouldn’t get interpretation errors) so instead of throwing up it just does its best at interpreting what you meant.