title: JavaScript Function to increment ending string value and retain leading zeros
body: <p>I am fairly new to programming and have been teaching myself JavaScript over the course of the last couple weeks. Using various resources such as Lynda.com, codewars, and other miscellaneous resources. I recently participated in a challenge on codewars and finally solved one that I had been having difficulty with for days myself for which I am very proud... I, however, would like to present this solution to you and explain it's function to you so that maybe ya'll as a community could critique it in terms of best practices and what I could have done differently to simplify the solution... Like I said, I'm still very new to this so I apologize if the solution seems overly bloated and elementary. Thank you for your consideration and time! </p>
  
  <p>So I was tasked with writing a function that accepts a string, tests it for numbers. If there is a number it is supposed to increment the number in the string and if there isn't or aren't any numbers it is supposed to append the number 1 to the end of the string. I appreciate all and any feedback on this, thank you!</p>
  
  <pre><code>    function incrementString (strng) {
         // Declare variables
         var findNum = strng.search(/[0-9]/);
         var findLetters = strng.slice(0, findNum);
         var numContainer = strng.slice(findNum);
         var numContainerConversion = parseInt(numContainer);
         // Increment number string conversion
         numContainerConversion++;
         // Check whether number search finds a match, if not, return string 
         //with 1 appended 
         if(findNum &lt; 0) {
           return strng += 1;
         } else if(findNum &gt;= 0) { //If number search finds a match, increment 
         //number and reappend to original string 
         numContainerConversion += "";
         var numLength = numContainer.length;
         var numContainerLength = numContainerConversion.length;
         //For Loop that adds zero padding as the number conversion strip 
         //original padding
         for(var i = numContainerLength; numContainerLength &lt; numLength; 
         numContainerLength++) {
         findLetters += "0"
         }
         return findLetters + numContainerConversion;
        }
       return numContainerConversion;
      }
  </code></pre>