-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
makeRobot Task #2368
base: develop
Are you sure you want to change the base?
makeRobot Task #2368
Conversation
src/makeRobotAccountant.js
Outdated
const first = Number(num1); | ||
|
||
const second = Number(num2); |
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.
these are not needed
src/makeRobotAccountant.js
Outdated
} else { | ||
const result = first + second; | ||
|
||
return result; | ||
} |
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.
you don't need to use else
when using return already
src/makeRobotAccountant.js
Outdated
if (counter % 2 === 0 && counter > 3) { | ||
return 'Bzzz... Error!'; | ||
} else { | ||
const result = first + second; |
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.
this variables is redundant
src/makeRobotAccountant.js
Outdated
const first = num1; | ||
|
||
const second = num2; |
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.
you don't need these variables just use num1 and num2 :)
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.
Great job! 🚀 🔥
all tests ok