Skip to content

Instantly share code, notes, and snippets.

@RahmatSaeedi
Last active May 10, 2021 14:21
Show Gist options
  • Save RahmatSaeedi/ba873aca1b5ff2de8f49df67baed2e21 to your computer and use it in GitHub Desktop.
Save RahmatSaeedi/ba873aca1b5ff2de8f49df67baed2e21 to your computer and use it in GitHub Desktop.
CodeSignal - Arcade - Intro - JS - checkPalindrome
function checkPalindrome(inputString) {
for(let i = 0; i<Math.floor(inputString.length/2); i++) {
if(inputString[i] != inputString[inputString.length - i-1]){
return false;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment