Skip to content

calcFactorial(n) in Factorial.js must return integer value instead of a string value #1092

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

Closed
itsAkshayDubey opened this issue Sep 6, 2022 · 1 comment
Labels
code quality Code quality improvement

Comments

@itsAkshayDubey
Copy link
Contributor

Hi,

As I can see, the current implementation of calculating the factorial of a number returns a string like "The factorial of 5 is 120" instead this function must return an integer value of 120, so that we can use this function in other algorithms to calculate factorial without having to write logic to calculate factorial and thereby increasing code redundancy in this repo. Currently, I working on an algorithm that requires me to calculate the factorial of a number but I am unable to use calcFactorial(n) from Factorial.js as it returns a string.

Regards,
Akshay

@itsAkshayDubey itsAkshayDubey changed the title calcFactorial(n) in Factorial.js must return integer value string value calcFactorial(n) in Factorial.js must return integer value instead of a string value Sep 6, 2022
@appgurueu appgurueu added the code quality Code quality improvement label Sep 6, 2022
@appgurueu
Copy link
Collaborator

Agreed. Feel free to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Code quality improvement
Projects
None yet
Development

No branches or pull requests

3 participants