beautify 1st part of the tutorial

This commit is contained in:
Ilya Kantor 2015-03-10 12:36:58 +03:00
parent e3dd2cedc0
commit 6444024a9d
327 changed files with 2358 additions and 1986 deletions

View file

@ -5,16 +5,18 @@
В свойство функции записано значение. Изменится ли оно после применения `bind`? Обоснуйте ответ.
```js
function sayHi() {
alert(this.name);
function sayHi() {
alert( this.name );
}
sayHi.test = 5;
alert(sayHi.test); // 5
alert( sayHi.test ); // 5
*!*
var bound = sayHi.bind({ name: "Вася" });
var bound = sayHi.bind({
name: "Вася"
});
alert(bound.test); // что выведет? почему?
alert( bound.test ); // что выведет? почему?
*/!*
```