{
let count = 0;
setInterval(() => {
console.log('first tick: ', ++count);
}, 200);
}
{
let count = 0;
setInterval(() => {
console.log('second tick: ', ++count);
}, 300);
}
with babili, will simply converts to
{
var a = 0;
setInterval(function() {
console.log('first tick: ', ++a)
}, 200)
}
{
var a = 0;
setInterval(function() {
console.log('second tick: ', ++a)
}, 300)
}
and getting variable redefined
with babili, will simply converts to
and getting variable redefined