Open enionsouza opened 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;
});
JavaScript in the browser
console.log
to your repo. It’s ugly, it kills performance and it can make confidential data be visible to anyone using the browser tools to look at your website.window.alert()
orwindow.confirm()
. It’s ugly, impossible to style, it stops code execution and displays differently on different browsers. Use custom modal instead.document.write
oreval
node_modules
dir to you.gitignore file as all those files are not needed in your repo (each team member will install all packages thanks to your package.json file).