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

@ -1,7 +1,7 @@
Ответ: `"Вася"`.
```js
//+ run
//+ run no-beautify
function f() {
alert(this.name);
}
@ -19,8 +19,8 @@ f(); // Вася
```js
function bind(func, context) {
return function() {
return func.apply(context, arguments);
return function() {
return func.apply(context, arguments);
};
}
```
@ -28,6 +28,7 @@ function bind(func, context) {
Код станет таким:
```js
//+ no-beautify
function f() {
alert(this.name);
}
@ -43,8 +44,8 @@ f(); // Вася
```js
function bind(func, context) {
*!*
return function() {
return func.apply(context, arguments);
return function() {
return func.apply(context, arguments);
};
*/!*
}

View file

@ -5,6 +5,7 @@
Что выведет этот код?
```js
//+ no-beautify
function f() {
alert(this.name);
}