nikoyee/TheScoop

Delete

Opened this issue · 1 comments

(FYI) Here the reason the test is failing is because what it is testing for is not met. The test is checking if comments[id] === null. When you delete something from an object that key/value pair is removed from the object. When you set something to null as in comments[id] = null you are just changing the value of that key. It still exists in the object, only now the value is null.

@cjessett what is the best practice to delete a resource ? should we just set the resource equal to null or remove the resource completely ?