{"action":"created","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/15","repository_url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion","labels_url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/15/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/15/events","html_url":"https://github.com/FreeCodeCamp/CurriculumExpansion/issues/15","id":163622485,"number":15,"title":"Object Oriented Programming Challenges","user":{"login":"QuincyLarson","id":985197,"avatar_url":"https://avatars.githubusercontent.com/u/985197?v=3","gravatar_id":"","url":"https://api.github.com/users/QuincyLarson","html_url":"https://github.com/QuincyLarson","followers_url":"https://api.github.com/users/QuincyLarson/followers","following_url":"https://api.github.com/users/QuincyLarson/following{/other_user}","gists_url":"https://api.github.com/users/QuincyLarson/gists{/gist_id}","starred_url":"https://api.github.com/users/QuincyLarson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuincyLarson/subscriptions","organizations_url":"https://api.github.com/users/QuincyLarson/orgs","repos_url":"https://api.github.com/users/QuincyLarson/repos","events_url":"https://api.github.com/users/QuincyLarson/events{/privacy}","received_events_url":"https://api.github.com/users/QuincyLarson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-07-04T07:59:16Z","updated_at":"2016-08-01T23:55:13Z","closed_at":null,"body":"@utsab is in charge of coordinating the expansion of these challenges, but he needs your help.\r\n\r\nFor each challenge, please reply to this GitHub issue with:\r\n1. Challenge description text\r\n2. Test suite (using the assert method)\r\n3. The seed code, which is pre-populated in the editor at the beginning of the challenge\r\n4. A working solution that makes all tests pass\r\n\r\nHere are the challenges we have currently planned (these can be further expanded):\r\n\r\nHere's a first draft of the topics for OOP in JS.  (The pre-existing challenges are marked with hash tag **#old**): \r\n\r\n- [ ] Declare JavaScript objects as variables #old \r\n- [ ] Constructors\r\n    - [ ] Construct JavaScript objects with functions #old\r\n    - [ ] Make instances of objects with constructor functions #old \r\n    - [ ] Use `instanceof` to show the type of an object created with a constructor\r\n    - [ ] `constructor` property of an instance also shows the type of an object\r\n    - [ ] Make unique objects by passing in parameters to constructor #old \r\n- [ ] More on `this`\r\n    - [ ] Every function gets a variable `this` ==> context in which the function was called.  Illustrate with exercise. \r\n    - [ ] `this` can refer to the global context.  Illustrate with exercise\r\n    - [ ] `this` can refer to a specific object.  Illustrate with exercise\r\n    - [ ] Explicitly set \"this\" with the \"call\", \"apply\", \"bind\" methods\r\n    - [ ] `use strict`\r\n- [ ] Prototypes\r\n     - [ ] Convert constructor-defined methods, \"setGear\" and \"getGear\" to prototype methods.  (Explain that two \"Bike\" instances have the exact same method \"setGear\" ==> duplicate code ==> prototypes can help eliminate the duplicate code.)\r\n     - [ ] Properties defined on `prototype` are available to all instances.  Illustrate with exercise.\r\n     - [ ] `prototype` properties vs. \"own\" properties\r\n     - [ ] Iterate over all properties of an object\r\n     - [ ] Iterate over all \"own\" properties of an object (using `hasOwnProperty`)\r\n     - [ ] Iterate over all `prototype` properties of an object\r\n     - [ ] Is the \"constructor\" property an \"own\" property or `prototype` property? Find out. \r\n     - [ ] If instance sets its \"own\" property, it overrides the prototype's property\r\n- [ ] Prototypes with Constructors\r\n     - [ ] Every object has a `prototype` property, including functions.  A constructor function has its own `prototype` property.  Illustrate with exercise.\r\n     - [ ] When you create an object using `new`, the constructor's prototype property is assigned to the object instance's prototype.  Exercise ==> print out the instance's \"prototype\" property\r\n     - [ ] Changing a `prototype` affects all instances\r\n     - [ ] Modify a built-in object's `prototype`, like Array.  (Explain why this is not a good idea in production). \r\n     - [ ] The constructor's prototype property is created with a \"constructor\" property equal to the function.\r\n- [ ] Inheritance\r\n     - [ ] Objects inherit behavior from other objects via prototype chaining.  A prototype chain occurs when one object's prototype is set to another object.  Since the prototype itself is an object, it has its own prototype.  \r\n     - [ ] Objects automatically inherit from `Object`\r\n     - [ ] Introduce concepts `subtype` and `supertype`\r\n     - [ ] Use `instanceof` to show that an object is an instance of `subtype` and `supertype`\r\n     - [ ] Show example where the `subtype` sets its prototype equal to an instance of the `supertype`\r\n     - [ ] Show that you have to manually set the `constructor` property to the `subtype`\r\n     - [ ] Calling `supertype` methods ===> use `[SuperTypeName].call` and pass in `this` \r\n     - [ ] The `obj.prototype` is not `obj`'s `prototype`.\r\n- [ ] Encapsulation (Data hiding)\r\n     - [ ] Module pattern for creating private members ===> Immediately invoked function expression (IIFE) \r\n     - [ ] Closure\r\n     - [ ] Modules are great for single objects.  Similar pattern for constructed objects.  Reuse \"Make object properties private\" to show how to make private members within a constructor.  #old\r\n     - [ ] The underscore before name convention\r\n- [ ] Other\r\n      - [ ] Prototypal chaining is not the only way to inherit behavior.  ===> `mixins`\r\n      - [ ] Various exercises to manipulate Arrays and Strings #old \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/comments/236746497","html_url":"https://github.com/FreeCodeCamp/CurriculumExpansion/issues/15#issuecomment-236746497","issue_url":"https://api.github.com/repos/FreeCodeCamp/CurriculumExpansion/issues/15","id":236746497,"user":{"login":"alookatommorow","id":10751085,"avatar_url":"https://avatars.githubusercontent.com/u/10751085?v=3","gravatar_id":"","url":"https://api.github.com/users/alookatommorow","html_url":"https://github.com/alookatommorow","followers_url":"https://api.github.com/users/alookatommorow/followers","following_url":"https://api.github.com/users/alookatommorow/following{/other_user}","gists_url":"https://api.github.com/users/alookatommorow/gists{/gist_id}","starred_url":"https://api.github.com/users/alookatommorow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alookatommorow/subscriptions","organizations_url":"https://api.github.com/users/alookatommorow/orgs","repos_url":"https://api.github.com/users/alookatommorow/repos","events_url":"https://api.github.com/users/alookatommorow/events{/privacy}","received_events_url":"https://api.github.com/users/alookatommorow/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T23:55:13Z","updated_at":"2016-08-01T23:55:13Z","body":"**@utsab** Thanks for chatting, glad to be contributing!  I am going to cover **Constructors**."}}
{"actor":{"display_login":"alookatommorow"}}