Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CoffeeScript palindrome...
palindrome = (string) -> if string.toUppercase() == string.toUppercase().split('').reverse().join('') then return true else return false
var palindrome = function(string) {if(string.toUppercase() == string.toUppercase().split('').reverse().join('')) {return true} else {return false }}
@appdevjrcigars

This comment has been minimized.

Copy link

@appdevjrcigars appdevjrcigars commented Dec 18, 2014

Nicely done. Minor change - just need to use string.toUpperCase()
The "C" was not capitalized

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.