Last active
May 18, 2021 20:22
-
-
Save shadow1349/50b985a38dcc2ca3cc598a436736bdc5 to your computer and use it in GitHub Desktop.
Basic Interview Question in JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a simple function which returns | |
* a boolean value indicating if a given | |
* string is a palindrome. Punctuation should | |
* be ignored. | |
* | |
* palindrome: a word, phrase, or sequence | |
* that reads the same backward as forward, | |
* e.g., madam or nurses run. | |
*/ | |
// input: string or number | |
const isPalindrome = (input) => { | |
return true; | |
}; | |
/* | |
Some example inputs and their expected result: | |
"dollop" --> false | |
"level" --> true | |
"Ana" --> true | |
"a car, a man, a maraca." --> true | |
1010 --> false | |
101 --> shouldBe: true | |
"abc|@#~€¬cba" --> shouldBe: true | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment