This file contains 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
// ES6 classes | |
public // - access anywhere | |
private // - access only inside class ( without inheritance ) | |
protected // - access only inside class and its children | |
readonly - // can be assigned only on default/constructor stages | |
static - // common property for all class instances ( as if we write it to class prototype ) | |
abstract // - can be used only for inheritance, putting before method make method obligatory to implement ( for children ) |
This file contains 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
const response = { | |
total: 1000, | |
correct: 270, | |
wrong: 565, | |
undone: 265, | |
}; |
This file contains 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
const examples = [ | |
'иван<span className="gray">-</span>да<span className="red">-</span>марья', | |
'игн<span className="green">о</span>рировать', | |
'иезуит', | |
'игн<span className="green">о</span>рировать', | |
'игн<span className="green">о</span>рировать', | |
'игн<span className="green">о</span>рировать', | |
'игн<span className="green">о</span>рировать', | |
'игн<span className="green">о</span>рировать', | |
]; |
This file contains 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
const alphabet = [ | |
{ letter: 'A', id: 0 }, | |
{ letter: 'Б', id: 1 }, | |
{ letter: 'В', id: 2 }, | |
{ letter: 'Г', id: 3 }, | |
{ letter: 'Д', id: 4 }, | |
]; |
This file contains 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
{ | |
total: 1000, | |
correct: 270, | |
wrong: 565, | |
undone: 265, | |
} |
This file contains 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
const taskSchema = { | |
title: 'Группа правил 1', | |
id: 12, | |
tasks: [ | |
{ | |
title: 'Правило 1.1', | |
id: 15, | |
tasks: [ | |
{ | |
title: 'Пункт правила 1.1.1', |
This file contains 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
// 1) Explain why the following doesn't work as an IIFE: function foo(){ }(); | |
//What needs to be changed to properly make it an IIFE? | |
// solution & explanation | |
// IIFE - Immediately-Invoked Function Expressions | |
// The problem here is that only Function Expressions can be invoked immediately | |
function foo() { | |
console.log('foo is invoked'); |