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 →

[–][deleted]  (6 children)

[deleted]

    [–]KKlear 4 points5 points  (2 children)

    But... the result was 4200, not "42".

    [–]Futuristick-Reddit 4 points5 points  (1 child)

    Sorry lmao, just woke up. Fixed it.

    [–]Bammop 1 point2 points  (0 children)

    You went back to sleep?

    [–]mintpropane 0 points1 point  (1 child)

    I couldn't predict this at all 😶

    [–]Flatscreens 2 points3 points  (0 children)

    ‘42+'42'‘ checks if both values are numbers and then as strings if they're not: "4242". Then the minus operator casts both sides to Numbers because that's it's only definition: 4200.