You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deleteToDo function filters the original array so it does return a new array with the deleted item missing, however I think each item of the new array will be a reference to the objects in the original array, rather than copies of the objects.
So although the delete function itself doesn't edit the original it doesn't return a completely new array - not entirely sure if this is an actual issue, as if you then went on to edit the item presumably the edit function would clone each object before making the edit...
Not sure if this is an actual issue but:
The deleteToDo function filters the original array so it does return a new array with the deleted item missing, however I think each item of the new array will be a reference to the objects in the original array, rather than copies of the objects.
So although the delete function itself doesn't edit the original it doesn't return a completely new array - not entirely sure if this is an actual issue, as if you then went on to edit the item presumably the edit function would clone each object before making the edit...
https://github.com/FAC-11/week2-atoms/blob/master/logic.js#L35
The text was updated successfully, but these errors were encountered: