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

Nicoleta tuturuga #1

Open
wants to merge 3 commits into
base: nicoleta-tuturuga
Choose a base branch
from

Conversation

nicoleta-tuturuga
Copy link

No description provided.

Copy link
Member

@alexonaci alexonaci left a 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)) {
Copy link
Member

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);
Copy link
Member

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) {
Copy link
Member

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

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