dheerajsachdeva / to-do-list

To-do list is a list of tasks that an individual needs to complete or accomplish. Built with JavaScript
Other
2 stars 0 forks source link

peer to peer review #9

Open vangelif opened 1 year ago

vangelif commented 1 year ago

You did a great job so far and you would like to review below points:

  1. line 55-59: you can create a forEach loop with two parameters (element and i)
  2. line 6-9: you can create a new module with variables and export them crud.js file and to other files
  3. Repetition makes your code WET. Remove either localStorage.setItem('tasks', JSON.stringify(tasks));
  4. Use an arrow function function createTask(task) { const taskEl = document.createElement('li'); taskEl.setAttribute('id', task.id); taskEl.classList.add('item'); if (task.completed) { taskEl.classList.add('complete'); }
vangelif commented 7 months ago

Hey Raj! You can close this comment if you implemented the changes already