const index = fromStorage.findIndex((o) => { return o.day === e.dataset.day && o.month === e.dataset.month; }); fromStorage.splice(index, 1); console.log(fromStorage);