title: Minimum number of digit changes to get two arrays to have the same value
body: <p>I am pretty new to coding and I'm trying my best, but after hours and hours of research i still cant figure this out. I'm trying to make these two separate arrays the same with the minimum number of moves. I can only ++ or -- one number at a time. </p>
  
  <p>This is the challenge: </p>
  
  <p>No reordering of the digits is allowed For example, consider two arrays: Andrea's <code>[123, 543]</code> and Maria's <code>[321, 279]</code>. For the first digit, Andrea can increment the 1 twice to achieve 3. The 2's are equal already. Finally, she decrements her 3 twice to equal 1. It took 4 moves to reach her goal. For the second integer, she decrements 5 three times, increments 4 three times and 3 six times. It took 12 moves to convert the second array element. In total, it took 16 moves to convert both values comprising the complete array.</p>
  
  <pre><code>let a = [1234, 4321]
  let m = [2345, 3214]
  
  function minimumMoves(a, m) {
      // Write your code here
      let numMoves = 0;
      let num1 = '' ;
      let num2 = '' ;
      let digit1 = '';
      let digit2= '';
      for (let i = 0; i &lt; a.length; i++)
      {
          num1 = a[i]; 
          while (num1 != 0) {
              digit1 = num1 % 10; 
              digit2 = num2 % 10; 
              num1 = Math.trunc(num1 / 10); 
              num2 = Math.trunc(num2 / 10);
              numMoves = numMoves + Math.abs(digit1 - digit2);
  
          }
      }
      return numMoves
  }
  </code></pre>