Skip to content

Commit 1e641f6

Browse files
committed
ex-1: update Employee.toString to use type getter instead of private field
1 parent 2dd4c4e commit 1e641f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/example-01/emplyees/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export class Employee {
1515
}
1616

1717
toString() {
18-
return `${this._name} (${this._type})`;
18+
return `${this._name} (${this.type})`;
1919
}
2020
}

0 commit comments

Comments
 (0)