Open
Conversation
Comment on lines
+26
to
+28
| for (let i = 0; i < groupOfPeople.length; i++) { | ||
| if (groupOfPeople[i].age >= 18) adultPartOfGroup.push(groupOfPeople[i]); | ||
| } |
There was a problem hiding this comment.
pls, try do not use "if" statement in one line. we can technically do this, but it hurts readability
HW5(OOP_vs_FP)/HW5_Khyzhniak.js
Outdated
| isAdmin = null; | ||
|
|
||
| constructor(nickname) { | ||
| this.nickname = nickname ?? 'Guest'; |
There was a problem hiding this comment.
and how we could make an emulation of the fact that this class is ABSTRACT?
Collaborator
Author
There was a problem hiding this comment.
Added throwing an error when trying to create an instance of an abstract class.
HW5(OOP_vs_FP)/HW5_Khyzhniak.js
Outdated
Comment on lines
+337
to
+343
| function pow(base) { | ||
| return function(exp) { | ||
| return base ** exp; | ||
| } | ||
| } | ||
|
|
||
| console.log(pow(2)(2)) // 4 |
There was a problem hiding this comment.
the essence of the closure is not shown, while I see only currying
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.