This commit is contained in:
Ilya Kantor 2017-03-21 17:14:05 +03:00
parent ab9ab64bd5
commit 97c8f22bbb
289 changed files with 195 additions and 172 deletions

View file

@ -0,0 +1,4 @@
The answer: `undefined`.
The result of `bind` is another object. It does not have the `test` property.

View file

@ -0,0 +1,23 @@
importance: 5
---
# Function property after bind
There's a value in the property of a function. Will it change after `bind`? Why, elaborate?
```js run
function sayHi() {
alert( this.name );
}
sayHi.test = 5;
*!*
let bound = sayHi.bind({
name: "John"
});
alert( bound.test ); // what will be the output? why?
*/!*
```