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

Answer #10

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

Answer #10

wants to merge 8 commits into from

Conversation

ENaranjo95
Copy link

I completed the challenge: 5
I feel good about my code: 4
I would like comments that could make my code dryer. Also coding edges cases that would cause my calculator application to break.

@ENaranjo95
Copy link
Author

A RESTFUL API Calculator with Node.js.


### Goal: Build a Simple Calculator using JS OOP best practices
This is a OOP concept calculator with a RESTFUL API to separate logic from front-end development.
Copy link

Choose a reason for hiding this comment

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

When writing an application, it is important to use the right tool for the job. In this case, a REST API is not the right tool. Calculations can be done right in the browser, no need to make a trip to the server to get the answer.

<input readonly class="answer" value="0"/>
<section class="row">
<button name="number" value="1">1</button>
<button name="number" value="2">2</button>
Copy link

Choose a reason for hiding this comment

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

The name attribute should be unique, like an ID (it is used when submitting form data). You would be better off assigning a class here, I think.

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.

3 participants