fix: Improve wording in Record Collection instructions (#49926)

This commit is contained in:
Rabin-Osti
2023-04-03 12:09:29 -06:00
committed by GitHub
parent a638da6747
commit b9fd70cdfc
@@ -22,8 +22,7 @@ Complete the function using the rules below to modify the object passed to the f
- Your function must always return the entire `records` object.
- If `value` is an empty string, delete the given `prop` property from the album.
- If `prop` isn’t `"tracks"` and `value` isn't an empty string, assign the `value` to that album’s `prop`.
- If `prop` is `"tracks"` and `value` isn’t an empty string, add the `value` to the end of the album’s existing `"tracks"` array.
- If the album doesn’t have a `"tracks"` property, create a new array for the album's `"tracks"` property before adding the `value` to it.
- If `prop` is `"tracks"` and value isn’t an empty string, add the `value` to the end of the album’s `"tracks"` array. You need to create this array first if the album does not have a `"tracks"` property.
**Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object.