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
On the page Lesson Review Record Collection the spoiler code and the hints does not create the empty array needed before adding the new value to the nested object properties. Adding in collection[id].tracks=[] in the else if (prop!=='tracks') fixes this.
So the function should look like such:
function updateRecords(id, prop, value) {
if (value===''){
delete collection[id][prop];
} else if (prop !== 'tracks') {
collection[id].tracks=[];
collection[id][prop] = value;
} else {
collection[id][prop].push(value);
}
return collection;
}
The text was updated successfully, but these errors were encountered:
I'm going to redo the whole thing as it has been updated and people have no noticed that my solution is for an older version.
I took a look and the challenged was updated. I always provide a copy of the instructions that I followed when solving the problem precisely for this case, I knew I would not be able to know when a challenge was changed so people would be able to check if my solution is for the latest version or not.
On the page Lesson Review Record Collection the spoiler code and the hints does not create the empty array needed before adding the new value to the nested object properties. Adding in
collection[id].tracks=[]
in theelse if (prop!=='tracks')
fixes this.So the function should look like such:
The text was updated successfully, but these errors were encountered: