Skip to content

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

Open
aleattene wants to merge 2 commits into
tomorrowdevs-projects:mainfrom
aleattene:solution/palindrome-number
Open

feat: added js solution (and tests) for challenge palindrome-number#87
aleattene wants to merge 2 commits into
tomorrowdevs-projects:mainfrom
aleattene:solution/palindrome-number

Conversation

@aleattene

Copy link
Copy Markdown
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