Creates palindrome numbers with first half as i . Value of j decides whether we need an odd length or even length palindrome .
var i = 1 ; while ( ( number = createPalindrome ( i ++ , j ) ) <= N ) { palindromes . push ( number ) ; } } return palindromes ; } function reverse ( input ) { var temparray = input . split ( ' ' ) ; var left , right = 0 ; right = temparray . length - 1 ; for ( left = 0 ; left < right ; left ++ , right -- ) {