title: Javascript - Substrings starting at the end and moving
body: <p>I am not sure if this is a duplicate but I need to break a string into substrings to place time dividers into it. I want to turn 2016 into 20.16 and 21070 into 2:10.70 by starting that the length of the string and moving 2 places in reverse.</p>
  
  <p>I tried the following on 2016:</p>
  
  <pre><code>best.toString().slice(-2, best.toString().length); //16
  best.toString().slice(-2, (best.toString().length - 2)); //blank
  </code></pre>
  
  <p>I tired the following on 21070:</p>
  
  <pre><code>best.toString().slice(-2, best.toString().length); //70
  best.toString().slice(-2, (best.toString().length - 2)); //blank
  best.toString().slice(-2, (best.toString().length - 4)); //blank
  </code></pre>
  
  <p>What am I missing with the starting point of the slice? Thanks!</p>