beautify 1st part of the tutorial
This commit is contained in:
parent
e3dd2cedc0
commit
6444024a9d
327 changed files with 2358 additions and 1986 deletions
|
@ -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);
|
||||
};
|
||||
*/!*
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
Что выведет этот код?
|
||||
|
||||
```js
|
||||
//+ no-beautify
|
||||
function f() {
|
||||
alert(this.name);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue