Skip to content

Commit a2597e8

Browse files
committed
first part of this complete.
1 parent 133a94a commit a2597e8

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎src/this.js‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ class User {
1616
const me = new User({
1717
username: 'LambdaSchool',
1818
password: 'correcthorsebatterystaple',
19-
});
19+
checkPassword: function(n) {
20+
if((this.password === n)
21+
return true;
22+
return false;
23+
)};
24+
};
25+
2026

2127
const result = me.checkPassword('correcthorsebatterystaple'); // should return `true`
2228

@@ -34,6 +40,17 @@ const checkPassword = function comparePasswords(passwordToCompare) {
3440

3541
// .call
3642

43+
const me = new User({
44+
username: 'LambdaSchool',
45+
password: 'correcthorsebatterystaple',
46+
checkPassword: function(n) {
47+
if((this.password === n)
48+
return true;
49+
return false;
50+
)};
51+
};
52+
53+
3754
// .apply
3855

3956
// .bind

0 commit comments

Comments
 (0)