Merge pull request #294 from antonzabirko/patch-1

Clarity for this
This commit is contained in:
Ilya Kantor 2017-11-14 11:14:29 +03:00 committed by GitHub
commit b103586b28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,8 +154,8 @@ let user = { name: "John" };
let admin = { name: "Admin" }; let admin = { name: "Admin" };
// use call to pass different objects as "this" // use call to pass different objects as "this"
sayHi.call( user ); // John sayHi.call( user ); // this = John
sayHi.call( admin ); // Admin sayHi.call( admin ); // this = Admin
``` ```
And here we use `call` to call `say` with the given context and phrase: And here we use `call` to call `say` with the given context and phrase: