Mistake in naming the property name.

The getter and setter are referring to this._name and the property name that is stored is this.name. Changed it to this._name.
This commit is contained in:
Amol K Patravali 2019-04-08 13:45:26 +05:30 committed by GitHub
parent 8f13d61a8b
commit e3e4502ce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,7 +163,7 @@ class User {
constructor(name) {
// invokes the setter
this.name = name;
this._name = name;
}
*!*