This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- let const ---- | |
| const a = 5; | |
| let b = 10; | |
| if (true) { | |
| let a = 1; | |
| let b = 2; | |
| const c = 3; | |
| console.log(a, b); // 1 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---- Module ---- | |
| // есть проблема в том что все свойства типа public, нет инкапсуляции | |
| var counter = { | |
| counter: 0, | |
| incrementCounter: function () { | |
| return ++this.counter; | |
| }, | |
| resetCounter: function () { | |
| return this.counter = 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "todos": [ | |
| { | |
| "id": 1, | |
| "title": "buy bread", | |
| "completed": true | |
| }, | |
| { | |
| "id": 2, | |
| "title": "buy milk", |
OlderNewer