Guest User

Untitled

a guest
Aug 5th, 2020
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. for ( let i = 0; carrot_count != i; carrot_count-- ) {
  2. setTimeout(function() {
  3. array[1].textContent = localStorage.getItem('carrot-count') - 1;
  4. }, 1000);
  5. }
  6.  
  7. /*
  8. localStorage.getItem('carrot-count') = 16, функция срабатывает один раз и значение изменятся на 15, но мне нужно сделать так, чтобы оно доходило до 0.
  9. *
Advertisement
Add Comment
Please, Sign In to add comment