Optimize js code
Budget: $10 – $15 USD
I have a function in js that may take up to two minutes and I want to show execution progress in some div.
function Test(str, year)
{
document.getElementById('modal').style.display = 'block';
for(i = 0; i < year.length; i++)
{
OneYear(str, year[i]);
}
}
So before iteration and after each cycle I want to update div (it is in a function inside a cycle).
function Test(str, year)
{
document.getElementById('modal').style.display = 'block';
for(i = 0; i < year.length; i++)
{
OneYear(str, year[i]);
}
}
So before iteration and after each cycle I want to update div (it is in a function inside a cycle).