Modified outputs in advanced programming and OOP chapters
This commit is contained in:
parent
9365275467
commit
7e183f85b1
2 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ user.sayNow = partial(user.say, new Date().getHours() + ':' + new Date().getMinu
|
||||||
|
|
||||||
user.sayNow("Hello");
|
user.sayNow("Hello");
|
||||||
// Something like:
|
// Something like:
|
||||||
// [10:00] Hello, John!
|
// [10:00] John: Hello!
|
||||||
```
|
```
|
||||||
|
|
||||||
The result of `partial(func[, arg1, arg2...])` call is a wrapper `(*)` that calls `func` with:
|
The result of `partial(func[, arg1, arg2...])` call is a wrapper `(*)` that calls `func` with:
|
||||||
|
|
|
@ -128,7 +128,7 @@ Object.defineProperty(user, 'fullName', {
|
||||||
|
|
||||||
alert(user.fullName); // John Smith
|
alert(user.fullName); // John Smith
|
||||||
|
|
||||||
for(let key in user) alert(key);
|
for(let key in user) alert(key); // name, surname
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note once again that a property can be either an accessor or a data property, not both.
|
Please note once again that a property can be either an accessor or a data property, not both.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue