Skip to content

Commit 3f5f2ca

Browse files
committed
work
1 parent 057783d commit 3f5f2ca

File tree

324 files changed

+668
-285
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

324 files changed

+668
-285
lines changed

1-js/2-first-steps/8-comparison/1-comparison-questions/solution.md renamed to 1-js/2-first-steps/08-comparison/1-comparison-questions/solution.md

File renamed without changes.

1-js/2-first-steps/8-comparison/1-comparison-questions/task.md renamed to 1-js/2-first-steps/08-comparison/1-comparison-questions/task.md

File renamed without changes.
File renamed without changes.

1-js/2-first-steps/9-uibasic/1-simple-page/solution.md renamed to 1-js/2-first-steps/09-uibasic/1-simple-page/solution.md

File renamed without changes.
File renamed without changes.

1-js/2-first-steps/15-function-expressions-arrows/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In Javascript a function is not a "magical language structure", but a special kind of value.
44

5-
The syntax that we've used before is called *Function Declaration*:
5+
The syntax that we used before is called *Function Declaration*:
66

77
```js
88
function sayHi() {
@@ -87,8 +87,8 @@ let sayHi = function() {
8787
```
8888
8989
The answer is simple:
90-
- There's no need in `;` at the end of code blocks and syntax structures that use them like `if { ... }`, `for { }`, `function f { }` and alike.
91-
- A Function Expression appears in the context of the statement: `let sayHi = value;`. It's not a code block. The semicolon `;` is recommended at the end of statements, no matter what is the `value`. So the semicolon here is not related to Function Expression itself in any way, it just terminates the statement.
90+
- There's no need in `;` at the end of code blocks and syntax structures that use them like `if { ... }`, `for { }`, `function f { }` etc.
91+
- The Function Expression appears in the context of the statement: `let sayHi = value;`. It's not a code block. The semicolon `;` is recommended at the end of statements, no matter what is the `value`. So the semicolon here is not related to Function Expression itself in any way, it just terminates the statement.
9292
````
9393

9494

1-js/5-data-structures/4-object2/2-is-empty/_js.view/solution.js renamed to 1-js/3-object-basics/1-object/3-is-empty/_js.view/solution.js

File renamed without changes.

1-js/5-data-structures/4-object2/2-is-empty/_js.view/test.js renamed to 1-js/3-object-basics/1-object/3-is-empty/_js.view/test.js

File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Just loop over the object and `return false` immediately if there's at least one property.
2+
3+
```js
4+
function isEmpty(obj)
5+
for(let key in obj) {
6+
return false;
7+
}
8+
return true;
9+
}
10+
```
11+

0 commit comments

Comments
 (0)