Skip to content

Create workout to cover prototypes in JavaScript #717

@lizTheDeveloper

Description

@lizTheDeveloper

Create a workout (or two, if it makes more sense) to cover the following standards and objectives.

We have content that covers the idea of inheritance, and the idea of constructors, in the Java Topic. We'll be moving lots of that into the Comp-Sci topic soon, so that we can have one "Object-Oriented Theory" course, and one "Object Oriented Implementation" section in each language course (where applicable, of course). You only have to cover the "how" and how prototypes can be class-like.

Ensure there is a question and exercise related to each of these labels:

  • js.prototype-class : Use prototypes to create class-like objects in JavaScript

    • js.prototype-class.0 Use a constructor function and the execution context of that function to produce an instance with particular properties
    • js.prototype-class.1 Use the prototype of the constructor function to set methods on instances produced by the constructor function
    • js.prototype-class.2 Modify the instance using a prototype method
  • js.prototype-inherit : Use prototypes to create class-like inheritance in JavaScript

    • js.prototype-inherit.0 Set the prototype of the constructor function to inherit methods on instances produced by the constructor function
    • js.prototype-inherit.1 Modify the instance using an inherited prototype's method

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions