JS Assignment 13 Intro to Classes in Javascript
nda1 (3)

Hey could anyone who has done the lambda precourse work help me, I do not understand why my answer is wrong. here is the assignment link: https://repl.it/student/submissions/6438375

function ClassOne(name, pw, mail){
// Exercise One: In this exercise you will be creating your own class!
// You are currently in the class, you are given three strings, name, pw, and mail.
// You need to create three properties on this class.
// Those properties are: 'username', 'password', and 'email'
// Set the value of username to name,
// Set the value of password to pw,
// Set the value of email to mail

this was my answer>>>
function ClassOne(username, password, email) {
this.username = name;
this.password = pw;
this.email = mail;
}

You are viewing a single comment. View All
JSer (1123)

Try this:

function ClassOne (name, pw, mail) {
    this.username = name;
    this.password = pw;
    this.email = mail;
}

You were just naming the parameters wrong