-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
base: master
Are you sure you want to change the base?
add task solution #2652
Conversation
There was a problem hiding this 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.
src/transformState.js
Outdated
@@ -5,7 +5,29 @@ | |||
* @param {Object[]} actions | |||
*/ | |||
function transformState(state, actions) { | |||
// write code here | |||
for (const obj of actions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed.
src/transformState.js
Outdated
for (const removeKey of obj.keysToRemove) { | ||
delete state[removeKey]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed.
There was a problem hiding this 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.
src/transformState.js
Outdated
} | ||
break; | ||
|
||
default : return null; |
There was a problem hiding this comment.
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.
src/transformState.js
Outdated
for (const removeKey of obj.keysToRemove) { | ||
delete state[removeKey]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed.
src/transformState.js
Outdated
@@ -5,7 +5,29 @@ | |||
* @param {Object[]} actions | |||
*/ | |||
function transformState(state, actions) { | |||
// write code here | |||
for (const obj of actions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixed.
Thanks for your comments, have already fixed all mistakes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.