title: No response from recursive function
body: <p>I want to create a function that is able to determine if a number is same or palindrome. if a given number is palindrome or same then return 2 otherwise if it is not palindrome or same then i need check it twice by increment the given number by 1. after that if it palindrome or same then return 1. if no palindrome or same number found then return 0. i write the function which is giving me the exact result when i give the number as 11211 but the function don't show any response if i enter 1122 or other random value. please help me to find where the error of my function. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function sameOrPalindrome(num) {
    var c = 0;
    var al = 0;
    var normalArray = num.toString().split("");
    var revArray = num.toString().split("").reverse();
    for (var i = 0; i &lt; normalArray.length; i++) {
      if (normalArray[i] != revArray[i]) {
        c++;
      }
    }
    if (c == 0) {
      return 2;
    } else {
      num++;
      al = sameOrPalindrome(num);
      if (al == 2) {
        return 1;
      } else {
        num++;
        al = sameOrPalindrome(num);
        if (al == 2) {
          return 1;
        }
      }
    }
    return 0;
  }
  
  console.log("1233",sameOrPalindrome(1233))</code></pre>
  </div>
  </div>
  </p>