title: Insert a specific character into a string/array
body: <p>I need to add <code>-</code> into the output on the screen for the ID. I keep messing up the splice or subString. I am not just if I am doing this right. This is my first post.</p>
  
  <p>Basically I need to turn the output from <code>00164973</code> to <code>001-64-973</code></p>
  
  <pre><code>function getID()
  {
        studentID = prompt("Please enter your student ID. \nExample: 01234567 ","00164973");
        if(studentID.length == 8)
        {
           document.write("Student ID: &lt;strong&gt;" +studentID+ "&lt;/strong&gt;&lt;br /&gt;");
           getFName();
        }
        else
        {
           document.write("I'm sorry but &lt;strong&gt;" +studentID+ "&lt;/strong&gt; is not a valid ID. &lt;br /&gt;Please try again.&lt;br /&gt;");
           getID();
        }
  } /*End of getID() */
  </code></pre>