Skip to content

Commit e712b33

Browse files
committed
Merge pull request DrkSephy#75 from mjunaidsalaat/master
Fixed results for `Getter and setter functions`.
2 parents a0bfd06 + 5c72555 commit e712b33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,12 +1163,12 @@ var emp = new Employee("James Bond");
11631163

11641164
// uses the get method in the background
11651165
if (emp.name) {
1166-
console.log(emp.name); // Mr. James Bond
1166+
console.log(emp.name); // Mr. JAMES BOND
11671167
}
11681168

11691169
// uses the setter in the background
11701170
emp.name = "Bond 007";
1171-
console.log(emp.name); // Mr. Bond 007
1171+
console.log(emp.name); // Mr. BOND 007
11721172
```
11731173

11741174
Latest browsers are also supporting getter/setter functions in Objects and we can use them for computed properties, adding listeners and preprocessing before setting/getting:

0 commit comments

Comments
 (0)