title: Split number into 4 random numbers
body: <p>I want to split <code>10</code> into an array of 4 random numbers, but neither can be <code>0</code> or higher than <code>4</code>. For example <code>[1,2,3,4]</code>, <code>[1,4,4,1]</code> or <code>[4,2,3,1]</code>.</p>
  
  <p>I think it's an easy question, but for some reason I can't think of how to do this. If someone has some instruction that would be very helpful!</p>
  
  <p>Edit:
  This is the code I have now, but I generates also a total number under 10:</p>
  
  <pre><code>  let formation = [];
    let total = 0;
  
     for (let i = 0; i &lt; 4; i ++) {
      if (total &lt; 9) {
        formation[i] = Math.floor(Math.random() * 4) + 1; 
      } else {
        formation[i] = 1;
      }
    }
  </code></pre>