Problem with Javascript Exercice: "Record Collection"

To create a new empty array for the tracks property just assign [] to the property:
collection[id].tracks = []

To delete a property from an object, here says that you need to use the delete operator:

There isn’t any method in an Object itself to delete its own properties (e.g. like Map.prototype.delete()). To do so one has to use the delete operator.

Also in this thread are good advice about this excercise: Help! Record Collection - #10 by gunhoo93

1 Like