How to Decrement an Incremented counter as long as it stays zero or above and returns 0 instead of "undefined"? – Javascript
incrementing and decrementing works as expected but I need the number to display '0' instead of 'undefined' if it becomes zero or less. Currently, When it becomes zero, it goes one step more and returns undefined. I need it to…