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

feat: added js solution (and tests) for challenge palindrome-number #87

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aleattene
Copy link
Contributor

Reviewers:
@micheleriva
@storrisi

I'm not sure it's the best solution.

An alternative but the less performing solution is for example this:

function isPalindrome(number) {
    let word = number.toString()
    let wordReversed = word.split("").reverse().join("")
    return (word === wordReversed)
}

Is possible to test the performance of both the solutions here:
https://replit.com/join/tvletostle-aleattene

Any other advice is always welcome.

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