DEV Community

Discussion on: What's the dumbest bug you caused yourself

Collapse
 
sir_wernich profile image
Wernich ️

it took me an hour to figure out why i only sometimes got a certain thing to happen (i can't remember what it was, so let's call it a popup). i'd go through the process of doing what needs to be done and only sometimes the popup worked and i couldn't figure it out.

turns out i shot myself in the foot when i used

if (variable) {
...
}

"that won't work you knob! 0 is a valid value!"