im wondering, why int++ is not working, but int+1 is working. Someone have an idea why this happend in my example? Is there any difference?
function retryFunction(something, count) {
if (!count) {
count = 0;
}
console.log(typeof count);
console.log(count);
if (count < 5) {
return setTimeout(function () {
//working
retryFunction(something, count+1);
//not working
retryFunction(something, count++);
}, 1000)
}
}
retryFunction(null);