{"success":true,"subunitProgress":{"allIds":["intro-callbacks-read","intro","challenge-set-timeout","challenge-add-two","precourse-what-is-js","challenge-console","learning-resources","csx-teaching-style","build-intro","build-identifying-project","build-resources-for-building","build-complete-build","challenge-dog-constructor","build-problem-solving-approach","challenge-inventory","challenge-person-from-constructor","challenge-make-person","challenge-developer-class","intro-oop","closures-divein","future-code-take-home","solution-group-by","challenge-add-s","intro-closures-pt-2","challenge-say-hello","challenge-were-awesome","solution-factorial","challenge-factorial","solution-repeater","solution-array-builder","challenge-shuffle-cards","challenge-fizzbuzz","challenge-string-methods","challenge-numbers-incrementor","intro-async","workshop-async","challenge-for-each-async","solution-for-each-async","challenge-ajax-simulate","challenge-run-in-order","solution-run-in-order"],"byId":{"intro-callbacks-read":{"type":"Read","done":false},"intro":{"type":"Read","done":true},"challenge-set-timeout":{"type":"Solve","done":false},"challenge-add-two":{"type":"Solve","done":false},"precourse-what-is-js":{"type":"Read","done":false},"challenge-console":{"type":"Solve","done":false},"learning-resources":{"type":"Read","done":false},"csx-teaching-style":{"type":"Read","done":false},"build-intro":{"type":"Read","done":false},"build-identifying-project":{"type":"Read","done":false},"build-resources-for-building":{"type":"Read","done":false},"build-complete-build":{"type":"Watch","done":false},"challenge-dog-constructor":{"type":"Solve","done":false},"build-problem-solving-approach":{"type":"Read","done":false},"challenge-inventory":{"type":"Solve","done":false},"challenge-person-from-constructor":{"type":"Solve","done":false},"challenge-make-person":{"type":"Solve","done":false},"challenge-developer-class":{"type":"Solve","done":false},"intro-oop":{"type":"Read","done":false},"closures-divein":{"type":"Read","done":false},"future-code-take-home":{"type":"Solve","done":false},"solution-group-by":{"type":"Watch","done":false},"challenge-add-s":{"type":"Solve","done":false},"intro-closures-pt-2":{"type":"Watch","done":false},"challenge-say-hello":{"type":"Solve","done":false},"challenge-were-awesome":{"type":"Solve","done":false},"solution-factorial":{"type":"Watch","done":false},"challenge-factorial":{"type":"Solve","done":false},"solution-repeater":{"type":"Watch","done":false},"solution-array-builder":{"type":"Watch","done":false},"challenge-shuffle-cards":{"type":"Solve","done":false},"challenge-fizzbuzz":{"type":"Solve","done":false},"challenge-string-methods":{"type":"Solve","done":false},"challenge-numbers-incrementor":{"type":"Solve","done":false},"intro-async":{"type":"Watch","done":false},"workshop-async":{"type":"Read","done":false},"challenge-for-each-async":{"type":"Solve","done":true},"solution-for-each-async":{"type":"Watch","done":false},"challenge-ajax-simulate":{"type":"Solve","done":false},"challenge-run-in-order":{"type":"Solve","done":true},"solution-run-in-order":{"type":"Watch","done":false}}},"challengeCode":[{"code_id":1404425,"code":"function wereAwesome(you, yourBuddy) {\n  // ADD CODE HERE\n}\n\n\n// Uncomment the lines below to test your function:\n// console.log(wereAwesome(\"Dave\", \"Will\")); // => \"Will and Dave are awesome!\"\n// console.log(wereAwesome(\"Victoria\", \"Jenny\")); // => \"Jenny and Victoria are awesome!\"\n// console.log(wereAwesome(\"Chris\", \"Jac\")); // => \"Jac and Chris are awesome!\"\n// console.log(wereAwesome(\"Phillip\", \"Skyler\")); // => \"Skyler and Phillip are awesome!\"","sub_unit_name":"challenge-were-awesome"},{"code_id":1404426,"code":"function factorial(num) {\r\n\r\n}\r\n\r\n// To check if you've completed the challenge, uncomment these console.logs!\r\n// console.log(factorial(4)); // -> 24\r\n// console.log(factorial(6)); // -> 720\r\n","sub_unit_name":"challenge-factorial"},{"code_id":1404424,"code":"// ADD CODE HERE\n\n// Uncomment these to check your work!\n// console.log(sayHello('Mary')); // should log: 'Hi, Mary'\n// console.log(sayHello('Haley')); // should log: 'Hi, Haley'","sub_unit_name":"challenge-say-hello"},{"code_id":1404432,"code":"let num1 = 32;\nlet num2 = 44;\n\n// ADD CODE BELOW HERE","sub_unit_name":"challenge-numbers-incrementor"},{"code_id":1404427,"code":"function shuffleCards(topHalf, bottomHalf) {\n  // YOUR CODE HERE\n}\n\n\n\n// UNCOMMENT TO TEST YOUR WORK\n// const topHalf = ['Queen of Diamonds', 'Five of Hearts', 'Ace of Spades', 'Eight of Clubs'];\n// const bottomHalf = ['Jack of Hearts', 'Ten of Spades'];\n// console.log(shuffleCards(topHalf, bottomHalf));\n//   /*-> ['Queen of Diamonds',\n//         'Jack of Hearts',\n//         'Five of Hearts',\n//         'Ten of Spades',\n//         'Ace of Spades',\n//         'Eight of Clubs',\n//       ]\n//   */","sub_unit_name":"challenge-shuffle-cards"},{"code_id":1475871,"code":"// ADD CODE HERE\n\n// Uncomment these to check your work!\n// console.log(typeof addTwo); // should log: 'function'\n// console.log(addTwo(10)); // should log: 12\n\ndas\nd\nas\ndas\nd\nas\ndas\nd\nas\ndas\nd\nas\nda\nsd\nas","sub_unit_name":"challenge-add-two"},{"code_id":1404430,"code":"const fb = [];\n// ADD CODE HERE\n\n\n\n// should log: [1, 2, 'fizz', 4, 'buzz', 'fizz', 7, 8, 'fizz', 'buzz', 11, 'fizz', 13, 14, 'fizzbuzz', 16]","sub_unit_name":"challenge-fizzbuzz"},{"code_id":1404431,"code":"let hometown = \"New York City\";\nlet favAlbum = \"The Rise and Fall of Ziggy Stardust and the Spiders From Mars\"\n\n// ADD CODE BELOW\n\n\n// Uncomment the line below to check your work!\n// console.log(count);\n// console.log(upper);\n// console.log(lower);","sub_unit_name":"challenge-string-methods"},{"code_id":1550942,"code":"function PersonConstructor() {\n  this.greet = function() {\n    console.log('hello');\n  }\n}\n\nfunction personFromConstructor(name, age) {\n\t// add code here\n\n\n}\n\nconst mike = personFromConstructor('Mike', 30);\n\n// Uncomment these lines to check your work!\n// console.log(mike.name); // -> Logs 'Mike'\n// console.log(mike.age); // -> Logs 30\n// mike.greet(); // -> Logs 'hello'","sub_unit_name":"challenge-person-from-constructor"},{"code_id":1475869,"code":"// Add code here","sub_unit_name":"challenge-set-timeout"},{"code_id":1439790,"code":"function Inventory(item, price) {\n  // add code here\n  \n}\n\nconst myInventory = new Inventory('cucumber', 2);\n\n// Uncomment these lines to check your work!\n// myInventory.addItem('carrot', 1);\n// console.log(myInventory.checkItem('cucumber')); // Logs: { price: 2, quantity: 1 }\n// myInventory.addItem('cucumber', 3); \n// console.log(myInventory.deleteItem('carrot')); // Logs: 'Deleted'\n// console.log(myInventory.deleteItem('carrot')); // Logs: 'Nothing to delete'\n// console.log(myInventory); // Logs: { cucumber: { price: 3, quantity: 2 }, carrot: { price: 1, quantity: 0 } }\n// console.log(myInventory.checkItem('radish')); // Logs: 'Item is not in inventory'","sub_unit_name":"challenge-inventory"},{"code_id":1550944,"code":"function makePerson(name, age) {\n\t// add code here\n\n\n}\n\nconst vicky = makePerson('Vicky', 24);\n\n\n// Uncomment these lines to check your work!\n// console.log(vicky.name); // -> Logs 'Vicky'\n// console.log(vicky.age); // -> Logs 24","sub_unit_name":"challenge-make-person"},{"code_id":1676652,"code":"// ADD CODE HERE\n\n// Uncomment these to check your work!\nconsole.log(typeof addS); // should log: 'function'\nconsole.log(addS('cat')); // should log: 'cats'\n","sub_unit_name":"challenge-add-s"},{"code_id":1550943,"code":"class PersonClass {\n\tconstructor(name) {\n    this.name = name;\n\t}\n\n\tgreet() {\n    console.log('hello');\n  }\n}\n\n// add code here\n\nconst thai = new DeveloperClass('Thai', 32);\n\n// Uncomment these lines to check your work!\n// console.log(thai.name); // -> Logs 'Thai'\n// thai.introduce(); // -> Logs 'Hello World, my name is Thai'","sub_unit_name":"challenge-developer-class"},{"code_id":1217499,"code":"// Add code here\n\nfunction runInOrderHelper(idx, cbs, times) {\n  setTimeout(() => {\n    cbs[idx]();\n    if (idx < cbs.length - 1) {\n      runInOrderHelper(idx + 1, cbs, times);\n    }\n  }, times[idx]);\n}\n\nfunction runInOrder(cbs, times) {\n  if (cbs.length) {\n    runInOrderHelper(0, cbs, times);\n  }\n}\n\n// /* Uncomment the following lines and click 'run' to test your work */\n\nfunction sayHi() {\n  console.log('hi');\n}\nfunction sayBye() {\n  console.log('bye');\n}\nfunction sayHowdy() {\n  console.log('howdy');\n}\n\nrunInOrder([sayHi, sayBye, sayHowdy], [200, 100, 300]);\n\n/*\nshould log:\n'hi' (after 200 ms)\n'bye' (100 ms after 'hi')\n'howdy' (300 ms after 'bye')\n*/","sub_unit_name":"challenge-run-in-order"},{"code_id":1217491,"code":"// Add code here\n\nfunction forEach(arr, cb) {\n  for (let ii = 0; ii < arr.length; ii++) {\n  \tcb(ii, arr[ii])\n  }\n}\n\nconst delays = [200, 500, 0, 350];\n\nfunction delayLog() {\n  forEach(delays, (idx, val) => setTimeout(() => console.log(`printing element ${idx}`), val));\n}\n\ndelayLog();","sub_unit_name":"challenge-for-each-async"},{"code_id":1217498,"code":"let dataReceived;\n\nfunction ajaxSimulate(id, callback) {\n  const database = ['Aaron', 'Barbara', 'Chris'];\n  // Add code here\n}\n\n// Also add code here\n","sub_unit_name":"challenge-ajax-simulate"},{"code_id":1439785,"code":"function Dog(name, breed) {\n\t// add code here\n\tthis.name = name;\n  this.breed = breed;\n  this.tricks = [];\n}\n\nDog.prototype.learnTrick = function (trick) {\n  this.tricks.push(trick);\n}\n\nDog.prototype.performTrick = function (trick) {\n  if (this.tricks.find(t => t === trick)) {\n    console.log(`${this.name} performed ${trick}!`);\n  } else {\n    console.log(`${this.name} doesn't know that trick.`);\n  }\n}\n\nconst fido = new Dog('Fido', 'poodle');\nconsole.log(fido)\n// Uncomment these lines to check your work!\nfido.learnTrick('fetch');\nfido.performTrick('fetch'); // should log 'Fido performed fetch!'\nfido.performTrick('sit'); // should log 'Fido doesn't know that trick.'","sub_unit_name":"challenge-dog-constructor"},{"code_id":1664093,"code":"// Write your code here\n","sub_unit_name":"future-code-take-home"},{"code_id":1592130,"code":"// Try un-commenting the line below\n// console.log(\"Hello World!\")\n\n// ADD CODE BELOW HERE\n\n\n\n","sub_unit_name":"challenge-console"}]}