3 ms·
One reason programmers do this is so that they can make a one character change, e.g. "else if (1 === 1)" -> "else if (1 === 2)" in order to change the logic the
by seeknotfind 2y ago
One reason programmers do this is so that they can make a one character change, e.g. "else if (1 === 1)" -> "else if (1 === 2)" in order to change the logic there. For C programers you see a lot of '#if 0' '#if 1' for this same purpose. Though, given that it's used everywhere, I'm not sure if it's really for that purpose.
- roblh 2y agoI’m a big fan of tacking on “&& false” or “|| true” as well.