title: New to javascript, how to write reverse iteration?
body: <p>I'm currently taking an introduction CIS class at my university and one of the projects is javascript. It is split into two unrelated parts and I was able to do the second part but I'm stuck on the first one. My professor wants me to write an iteration that will display in a reverse order whatever name I write in the prompt screen. So if I write "John Smith" it will display "htims nhoj". The issue is that I have no idea how to write it.</p>
  
  <pre><code>&lt;html&gt;
     &lt;body&gt;
        &lt;script&gt;
           var namIn = window.prompt("Enter name:" );  
           var namAr = namIn.split("");  
           var namArLen = namAr.length;
           document.write(namAr + "&lt;br /&gt; Length: " + namArLen);
       &lt;/script&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>