Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add task solution #2652

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rostyslav48
Copy link

No description provided.

Copy link

@AntonHerasymov AntonHerasymov left a comment

Choose a reason for hiding this comment

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

Good job!
Just a few things to improve.

@@ -5,7 +5,29 @@
* @param {Object[]} actions
*/
function transformState(state, actions) {
// write code here
for (const obj of actions) {

Choose a reason for hiding this comment

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

image

Choose a reason for hiding this comment

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

Not fixed.

Comment on lines 16 to 18
for (const removeKey of obj.keysToRemove) {
delete state[removeKey];
}

Choose a reason for hiding this comment

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

image
Better use forEach()

Choose a reason for hiding this comment

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

Not fixed.

Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

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

Please correct the comments of the previous review.

}
break;

default : return null;

Choose a reason for hiding this comment

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

It is better to return an error or a message that something went wrong.

Comment on lines 16 to 18
for (const removeKey of obj.keysToRemove) {
delete state[removeKey];
}

Choose a reason for hiding this comment

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

Not fixed.

@@ -5,7 +5,29 @@
* @param {Object[]} actions
*/
function transformState(state, actions) {
// write code here
for (const obj of actions) {

Choose a reason for hiding this comment

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

Not fixed.

@rostyslav48
Copy link
Author

Thanks for your comments, have already fixed all mistakes

Copy link

@Moroz-Dmytro Moroz-Dmytro left a comment

Choose a reason for hiding this comment

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

👍

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.

4 participants