Skip to content

Instantly share code, notes, and snippets.

@terakilobyte
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terakilobyte/914671c9be928ff7b03b to your computer and use it in GitHub Desktop.
Save terakilobyte/914671c9be928ff7b03b to your computer and use it in GitHub Desktop.
{
"name": "Palindrome Tester",
"difficulty": 1, // should be a range from 1-5
"description": [
"Your job is to determine if a provided string is a palindrome.",
"The definition of a palindrome can be found at http://en.wikipedia.org/wiki/Palindrome.",
"Strings will be passed in with varying formats, such as \"racecar\", \"RaceCar\", and \"race CAR\" among others.",
"Return true if the string is a palindrome, otherwise false"
],
"publicTests": [
"expect(palindrome(\"eye\")).to.be.a.(\"boolean\");",
"assert.deepEqual(palindrome(\"eye\"), true);",
"assert.deepEqual(palindrome(\"race car\"), true);",
"assert.deepEqual(palindrome(\"not a palindrome\"), false);"
],
"privateTests": [
"assert.deepEqual(palindrome(\"A man, a plan, a canal. Panama\"), true);",
"assert.deepEqual(palindrome(\"never odd or even\"), true);",
"assert.deepEqual(palindrome(\"nope\"), false);"
],
"challengeSeed": "function palindrome(str) {\n // Good luck!\n return true;\n}\n\n",
"challengeNumber": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment