diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index 4e0a06ef50..b7e36c6df3 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -4153,17 +4153,56 @@ }, { "id": "56533eb9ac21ba0edf2244cf", - "title": "Checkpoint: Objects", + "title": "Record Collection", "description": [ - "Update a JSON or other Object with a property name and value passed in variables" + "You are given a JSON object representing (a small part of) your record collection. Each album is identified by a unqiue id number and which has several properties. Not all albums have complete information.", + "Write a function which takes an id, a property (prop), and a value.", + "For the given id in collection:", + "If the property is \"tracks\", push the value onto the end of the tracks array.", + "If value is non-blank (value !== \"\"), then update or set the value for the prop.", + "If value is blank, delete that prop.", + "Always return the entire collection object." ], "releasedOn": "11/27/2015", "tests": [ "assert(1===1, 'message: message here');" ], "challengeSeed": [ + "var collection = {", + " 2548: {", + " album: \"Slippery When Wet\",", + " artist: \"Bon Jovi\",", + " tracks: [ ", + " \"Let It Rock\", ", + " \"You Give Love a Bad Name\" ", + " ]", + " },", + " 2468: {", + " album: \"1999\",", + " artist: \"Prince\",", + " tracks: [ ", + " \"1999\", ", + " \"Little Red Corvette\" ", + " ]", + " },", + " 1245: {", + " artist: \"Robert Palmer\",", + " tracks: [ ]", + " },", + " 5439: {", + " album: \"ABBA Gold\"", + " }", + "};", + "", + "// Only change code below this line", + "function update(id, prop, value) {", "", "", + " return collection;", + "}", + "", + "// Alter values below to test your code", + "update(5439, \"artist\", \"ABBA\");", "" ], "tail": [