Skip to content

Conversation

@dmytro-khyzhniak
Copy link
Collaborator

No description provided.

@dmytro-khyzhniak dmytro-khyzhniak marked this pull request as ready for review March 11, 2021 20:02
Comment on lines 26 to 28
for (let i = 0; i < groupOfPeople.length; i++) {
if (groupOfPeople[i].age >= 18) adultPartOfGroup.push(groupOfPeople[i]);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls, try do not use "if" statement in one line. we can technically do this, but it hurts readability

isAdmin = null;

constructor(nickname) {
this.nickname = nickname ?? 'Guest';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and how we could make an emulation of the fact that this class is ABSTRACT?

Copy link
Collaborator Author

@dmytro-khyzhniak dmytro-khyzhniak Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added throwing an error when trying to create an instance of an abstract class.

Comment on lines 337 to 343
function pow(base) {
return function(exp) {
return base ** exp;
}
}

console.log(pow(2)(2)) // 4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the essence of the closure is not shown, while I see only currying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants