Content-Length: 259663 | pFad | https://github.com/TheAlgorithms/JavaScript/issues/1092

A1 calcFactorial(n) in Factorial.js must return integer value instead of a string value · Issue #1092 · TheAlgorithms/JavaScript · GitHub
Skip to content

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

@itsAkshayDubey

Description

@itsAkshayDubey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityCode quality improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/TheAlgorithms/JavaScript/issues/1092

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy