Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Created June 7, 2013 22:35
Show Gist options
  • Save hyonschu/5732882 to your computer and use it in GitHub Desktop.
Save hyonschu/5732882 to your computer and use it in GitHub Desktop.
var str = "xxoo";
function palins(str) {
if (str.length%2==1) {
return false;
} else {
var array = str.split("");
var yarra = str.split("").reverse();
for (var i=0;i<array.length/2;i++)
if (array[i] !== yarra[i]) {
}
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment