Skip to content

shoul10/palindrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

palindrome

palindrome is released under the MIT License

palindrome is a simple function that returns a boolean indicating whether or not a string is a palindrome. The function will return true if the string is a palindrome; otherwise, it returns false.

For example:

var eye = "Eye";
console.log(eye.isPalindrome());                       // logs 'true'
console.log("level".isPalindrome());                   // logs 'true'
console.log("levels".isPalindrome());                  // logs 'false'
console.log("A car, a man, a maraca".isPalindrome());  // logs 'true'

License

MIT