palindromes.md

```js function palindrome(str) { var string = str.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase(); var a = []; var b = []; a = string.split('').join(''); b = string.split('').reverse().join(''); if (a === b) { return true; } else { return false; } } palindrome("1 eye for of 1 eye."); ```
A simple palindromes check

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.