I hereby claim:
- I am dadeg on github.
- I am dandegreef (https://keybase.io/dandegreef) on keybase.
- I have a public key whose fingerprint is 805A 38C1 AEC8 7AB2 4B62 B713 7F43 B7C6 8709 9381
To claim this, I am signing this object:
var isPalindrome = (input) => { | |
if (typeof input !== 'string' && !Array.isArray(input)) { throw "isPalindrome() requires a string or array as an argument."; } | |
if (typeof input === 'string') { input = input.split(""); } | |
let one = input.pop(); | |
let two = input.shift(); | |
if (two === undefined) { return true; } | |
if ( one === two ) { return isPalindrome(input); } | |
return false; | |
} | |
console.log(isPalindrome('a')); // true |
I hereby claim:
To claim this, I am signing this object: