[V3] Implement new Concept Exercise: classes-intro
See original GitHub issueThis issue describes how to implement the class
concept exercise for the JavaScript track.
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism’s maintainers’ time. So, before diving into the implementation, please read up on the following documents:
Please also watch the following video:
Goal
This exercise’s goal is to teach the student about the function of class
es in Javascript, why they exist, and how to implement them.
Learning objectives
- Understand the
constructor
function - Understand how
this
works - Know how to effectively create prototypal properties
Out of scope
- The
new
keyword - Initializing classes (this exercise will only teach students how to implement classes in this exercise, not how to use them).
- Factory functions
- Class expressions (declaring a class with a
var
statement) - Static properties & static methods
extends
keyword- Class inheritance with
super
Concepts
- Creating private properties in the
constructor
function - Creating public functions that consume the properties defined in the constructor
- Using
this
to access class-wide properties
Prerequisites
booleans
strings
functions
objects
Resources to refer to
Hints
- [How to use
this
to access class properties][http://test.com] - Using
this
in methods on the class prototype
After
Representer
No changes required
Analyzer
No changes required
Implementing
See the implementation guide for JavaScript for more detail.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top GitHub Comments
I’ll be creating a new branch on my fork for this.
A replacement issue for this one was created to fit the target learning curve: https://github.com/exercism/javascript/issues/1015 Please go there if you still want to contribute to the classes concept exercise. This issue will be closed.