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
Zavexeon (306)

You have to declare the variables like this: var var_name = value;

Because this is an assignment, that's as much as I'll tell you.

Good luck. :)

ArchieMaclean (616)

@Zavexeon That's not the reason that his code is wrong though - you don't have to do that for attributes.