title: I want to change base 10 number to base 16
body: <p>I'm writing some code(javascript) to change a base 10 number into base 16. I know base 16 have letters if the remainder is between 10 and 15. This is where I am having trouble. I can't change the remainder into the letter.</p>
  
  <p>so far this what I have:</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>var mynum = 4053,remainder=[];
  
  while (mynum &gt; 0) {
  
    total = mynum % 16;
    remainder.push(total);
    mynum = Math.floor(mynum / 16);
  
    switch (total &gt; 9 || total &lt; 16) {
      case total === 10:
        total = "A";
        break;
      case total === 11:
        total = "B";
        break;
      case total === 12:
        total = "C";
        break;
      case total === 13:
        total = "D";
        break;
      case total === 14:
        total = "E";
        break;
      case total === 15:
        total = "F";
        break;
    }
  
  }
  
  console.log(total,remainder)</code></pre>
  </div>
  </div>
  </p>
  
  <p>Let's say "mynum" = 4053 then I would get 5,13,15. But I want to get 5,D,F.I also tried using a "for" loop but got the same thing. It feels like i'm close but just missing something something, Can someone please help me?</p>
  
  <p><em>mynum is the actual number, total is the remainder, and "remainder" is where i put the remainder's in a list</em></p>