Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function User(name, email, password) {
- this.name = name,
- this.email = email,
- this.password = password,
- this.details = function() {
- console.log(`${this.name}, ${this.email}, ${this.password}`);
- }
- }
- const user1 = new User('John', 'john@doe.com', '1234');
- user1.details();
- const user2 = new User('Mary', 'mary@jane.com', '1234');
- user2.details();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement