gremicro.blogg.se

Freecodecamp javascript
Freecodecamp javascript





  • If 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 existing "tracks" array.
  • If prop isn’t "tracks" and value isn't an empty string, assign the value to that album’s prop.
  • If value is an empty string, delete the given prop property from the album.
  • Your function must always return the entire records object. freeCodeCamp is fun and challenging 8 months(10-hour per week) the course are designed to train future web developers the fundamentals of web space development.
  • value - a string containing the information used to update the album’s propertyĬomplete the function using the rules below to modify the object passed to the function.
  • prop - a string representing the name of the album’s property to update.
  • id - a number representing a specific album in the records object.
  • records - an object containing several individual albums.
  • The updateRecords function takes 4 arguments represented by the following function parameters: Not all albums have complete information. Within each album object, there are various properties describing information about the album.

    freecodecamp javascript freecodecamp javascript

    Each album is represented in the collection with a unique id as the property name. The collection is organized in an object that contains multiple albums which are also objects. You are creating a function that aids in the maintenance of a musical album collection. There was a discussion on the forum for an update to the wording here, but we forgot to turn it into an issue.







    Freecodecamp javascript