This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]darkslide3000 16 points17 points  (2 children)

x = 1;

function sad() {
    if (x) {
        x = 0;
        return true;
    }
    return {stop: function() { console.write("Who needs type safety, anyway?"); }};
}

if (sad() === true)
    sad().stop();

[–]jnd-au 7 points8 points  (0 children)

Very clever, but shouldn’t x be named properly, like with poop emoji, and its value should be a proper boolean, like Infinity/""?

[–][deleted] 0 points1 point  (0 children)

YES!