Skip to content

Commit 6ea8a5e

Browse files
committed
Completed part 1 of this.js
1 parent b630fc8 commit 6ea8a5e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/this.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
class User {
88
constructor(options) {
99
// set a username and password property on the user object that is created
10+
this.username = options.username;
11+
this.password = options.password;
1012
}
1113
// create a method on the User class called `checkPassword`
1214
// this method should take in a string and compare it to the object's password property
1315
// return `true` if they match, otherwise return `false`
16+
checkPassword(string) {
17+
return this.password === string;
18+
}
1419
}
1520

1621
const me = new User({

0 commit comments

Comments
 (0)