title: javascript caesar cipher algorithm
body: <p>Is there anyway to do this function?, because i find it quite difficult to understand, specially that function with a char parammeter which i dont see where or how i use it.</p>
  
  <pre><code>function trans(msg, rot) {
      //Reemplaza cada letra encontrada de la expresion [a-z], por el caracter codificado de la funcion
      return msg.replace(/([a-z])/ig,
          function(char) {
              var codASCII = char.charCodeAt(0);
              return String.fromCharCode( codASCII &gt;= 97 ? (codASCII + rot + 26 - 97) % 26 + 97 : (codASCII + rot + 26 - 65) % 26 + 65 );
          });
  }
  </code></pre>
  
  <p>thank you in advance</p>