-
Notifications
You must be signed in to change notification settings - Fork 7
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
Nicoleta tuturuga #1
base: nicoleta-tuturuga
Are you sure you want to change the base?
Nicoleta tuturuga #1
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.
Try to use in the future one line between statements
Looks good and clean
GG!
|
||
|
||
getErrorMessageOnOperands(valueInputOne, valueInputTwo, selectOne); | ||
if (getErrorMessageOnOperands(valueInputOne, valueInputTwo, selectOne)) { |
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 does not look necessary to call getErrorMessageOnOperands twice since it is called in the if statement also
|
||
// logic to calculate the values from inputs | ||
function operations(value1, value2, operator) { | ||
value1 = Number(value1); |
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 a good practice to not reassign arguments. you can use just a different variable
|
||
|
||
// logic for inserting only numbers in the inputs | ||
function inputTypeNumber(operand) { |
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 a best practice to have function names that represent actions. for example: checkIfInputTypeNumber
No description provided.