MCPcopy Create free account
hub / github.com/PhilopaterHany/JavaScript-Bootcamp / User

Class User

Lessons/Week 19/154 - Class Encapsulation.js:11–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9*/
10
11class User {
12 // Private Property
13 #e;
14 constructor(id, username, eSalary) {
15 this.i = id;
16 this.u = username;
17 this.#e = eSalary;
18 }
19 getSalary() {
20 return parseInt(this.#e);
21 }
22}
23
24let userOne = new User(100, "Elzero", "5000 Gneh");
25

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected