JSFiddle - React, Tailwind, and code Playground
JavaScript
var j = 0;
var test = function f(n){
var i = j++;
while(n > 0){
console.log('(' + i + ": " + n + ')');
f(--n);
}
};
test(3);
var j = 0;
var test = function f(n){
var i = j++;
while(n > 0){
console.log('(' + i + ": " + n + ')');
f(--n);
}
};
test(3);