Explaining a JavaScript function line by line
<p>I've come across the following piece of JavaScript and would like to know what it's doing:</p>

<pre><code>function flipString(aString) {
 var last = aString.length - 1;
 var result = new Array(aString.length)
 for (var i = last; i &gt;= 0; --i) {
  var c = aString.charAt(i)
  var r = flipTable[c]
  result[last - i] = r != undefined ? r : c
 }
 return result.join('')
}
</code></pre>
