Below JavaScript loop for increment is working, but for decrement not. How to solve this?
for(var i=1; i<5; i++) { alert(i); } work fine
for(var i=10; i<5; i--) { alert(i); } not working
Better check it with ease... for decrement use
for (var i = 10; i > 5; i--) { alert(i); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With