-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: master
Are you sure you want to change the base?
Answer #10
Conversation
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. |
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.
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> |
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.
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.
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.