Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const polindrom = str => {
- const lastIndex = str.length - 1;
- let result;
- for(let i = 0; i < lastIndex/2; i++){
- result = str[i].toLowerCase() === str[lastIndex - i].toLowerCase();
- if (!result) return result
- };
- return result
- };
Advertisement
Add Comment
Please, Sign In to add comment