enionsouza / TODO-List

A minimalist tool that helps you organize your day.
MIT License
3 stars 0 forks source link

JavaScript in the browser #10

Open enionsouza opened 3 years ago

enionsouza commented 3 years ago

JavaScript in the browser

notlfish commented 3 years ago

https://github.com/enionsouza/TODO-List/blob/4e3cfa13904d5f3ab481681e2ab021b642ca79a8/src/todo.js#L21-L25 forEach allows you to take the index as an extra argument, like this:

    this.tasks.forEach((task, index) => {
      task.index = index;
    });