• Excigma@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 months ago

    I’m on my phone rn so can’t format well, but one such example is:

    const thing = require(“module”)

    (async () => { something })()

    without a ; at the end of the first line, JavaScript will try to do require(“module”)() instead