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

Implement _check #2282

Open
wants to merge 1 commit into
base: paritosh142
Choose a base branch
from
Open

Conversation

paritosh142
Copy link

Description

Refactored the calculator operations (add, subtract, multiply, divide) to use the _check function for type checking. This removes redundancy and improves code maintainability.

Changes

  • Implemented _check function in src/calculator.js
  • Updated all calculator operations to call _check for type validation
  • Updated tests in src/calculator.test.js to reflect the changes

Testing

  • Ran npm test to ensure all tests pass

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.

1 participant