Open edahigure opened 1 year ago
lines 92-94 may also be refactored to don's use for
for (let i = 0; i < result.length; i += 1) {
result[i].index = i;
}
lines 166 - 167 may be refactored for (let i = 0; i < this.taskListArr.length; i += 1) { this.initEvent(i); }
lines 176-178
This may also be refactored
for (let i = 0; i < this.taskListArr.length; i += 1) {
if (this.taskListArr[i].completed === false) {
newArray.push(this.taskListArr[i]);
}
}
lines 220 226 code is repeated almost identically.
lines 226-232
Maybe this can be refactored
let retDataTemp = [];
if (localStorage.taksListStorage !== undefined) { retDataTemp = JSON.parse(localStorage.taksListStorage); }
export const myTask = new ListTasks(retDataTemp);
to be simpler or put it on the constructor