title: Format a string in blocks of 3 digits
body: <p>How would I go about reformating a string into <strong>blocks of 3 digits</strong> separated by dash (-) in JavaScript?</p>
  
  <p>ex:</p>
  
  <pre><code>let myString = "00  64 33 3-44-23 982-  23-1-0"
  </code></pre>
  
  <p>produce desired output as:</p>
  
  <pre><code>myString = "006-433-344-239-822-310"
  </code></pre>