DEV Community

loading...

Discussion on: What does "if(variable++)" do in Javascript

Collapse
lallenfrancisl profile image
Allen Francis

Also I would not use this thing in an application because it's going to create a lot of bugs in the future since its hard to understand. It's best to just not use the increment operator at all and just use num += 1 or num -= 1