Skip to content

Instantly share code, notes, and snippets.

@shadow1349
Last active May 18, 2021 20:22
Show Gist options
  • Save shadow1349/50b985a38dcc2ca3cc598a436736bdc5 to your computer and use it in GitHub Desktop.
Save shadow1349/50b985a38dcc2ca3cc598a436736bdc5 to your computer and use it in GitHub Desktop.
Basic Interview Question in JavaScript
/**
* 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