Skip to content

Create a constructor function for an Sessions Excercise #26

Description

@Willsbam

If there isn't a folder yet create a constructor folder

A constructor function is similar to C++ or other languages constructors, an example is below:

function Car(type, model, color) {
this.type = type;
this.model = model;
this.color = color;
this.start = function() {
console.log("Engine starting...");
};
}
const car1 = new Car("Sedan", "Civic", "Blue");
const car2 = new Car("SUV", "CRV", "Red");
console.log(car1);


Reference this: https://drive.google.com/file/u/1/d/1gwcgkMZDAUTUM7klxQcF9IJGR9pfc_kk/view?usp=sharing for designing it
Create the Excercise Object defined within this chart in a new file in the constructors folder.
Make certain you have:
*A list that should only take in set objects if they have all the needed fields(If they are empty thats fine, but the keys have to exist)
*Have methods defined to add and remove sets from the exercise object

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions