DEV Community

loading...

Discussion on: Code Golf Challenge: Palindrome Detector

Collapse
daveturissini profile image
David Author • Edited
let p = (w) => { let i = 0,c = w[i],l=w.length - 1;while(c){if(c !== w[l-i]){return false}c=w[++c]}return true}