question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Check for palindromes" passes with full uppercasing as well

See original GitHub issue

Challenge Check for Palindromes has an issue. User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function palindrome(str) {
  str = str.toUpperCase().replace(/\W|_/g, '');
  return str === str.split('').reverse().join('');
}
palindrome("eye");

A minor issue, but since the instructions state it should be lowercased, a test for lowercasing should be added. Currently it works as long as the case is the same throughout.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
weejimmycommented, Aug 5, 2016

I can do this one.

0reactions
BKinahancommented, Aug 5, 2016

Great! 👍

To potential contributors: This issue can be resolved by opening a pull request that changes line 171 of this file as detailed above. Please follow the Contributor’s Guide and remember to visit the HelpContributors chat room if you need any assistance. We’re here to help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Algorithms 101: How to check if a string is a palindrome
Solution 3: Use Recursion; What to learn next. Ace your coding interview the first time. This learning path will take you through all...
Read more >
Java program to check whether a string is a Palindrome
We can check if the given string is a palindrome by comparing the original ... lowercase or uppercase before we check it for...
Read more >
JavaScript Algorithms: Checking for Palindromes
In order to check for a palindrome, all we need to do is make sure that the word spells out to exactly how...
Read more >
Noisy Palindrome Algorithm (Check Lowercase Palindrome ...
You are given a string s containing lowercase and uppercase alphabet characters as well as digits from “0” to “9”.
Read more >
Check string for palindrome - java - Stack Overflow
Why not just: public static boolean istPalindrom(char[] word){ int i1 = 0; int i2 = word.length - 1; while (i2 > i1) {...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found