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
/* | |
* Single Responsibility Principle | |
* Принцип единственной ответственности | |
* | |
* У класса\модуля должна быть только одна причина для изменения | |
* или класс должен отвечать только за что-то одно | |
*/ | |
class News { | |
constructor(title, text) { |
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
class LinkedNode { | |
constructor(data, next = null) { | |
this.data = data | |
this.next = next | |
} | |
} | |
class LinkedList { | |
constructor() { | |
this.head = null |