Skip to content

Make Instances of Objects with a Constructor Function - Can pass using a plain object #16112

@kevcomedia

Description

@kevcomedia

Challenge Name

https://www.freecodecamp.org/challenges/make-instances-of-objects-with-a-constructor-function

Issue Description

It is possible to pass the challenge by assigning myCar with a plain object, then giving it wheels and nickname properties.

Related forum post:
https://forum.freecodecamp.org/t/make-instances-of-objects-with-a-constructor-function-right-code/160347

Your Code

var Car = function() {
  this.wheels = 4;
  this.engines = 1;
  this.seats = 5;
};

// Only change code below this line.

var myCar = {};

myCar.nickname = "Betsy";
myCar.wheels = 4;

Screenshot

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.status: blockedIn a transient & temporary hold.status: shippingTo be applied to issues or PR's that are already fixed or resolved and are awaiting deployment

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions