• sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    3 days ago

    Javascript also exists on the server, and an exception would cause a 500 error. Semicolons are optional in JavaScript, except for a handful of cases. One of those is in a for loop. I’m guessing the professor was running a nodejs app and did something like this (intentionally bad style because professor):

    for (x = 0; x < 5 x++)
    {} 
    return x
    

    Boom, syntax error, which would return a 500 air status in a nodejs web server framework.