Decryption function
<p>I have this function which decrypts encrypted message. First letter in the encrypted text is a signal character. </p>

<pre><code>function decryptWord(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
{
    var signalCharacter = cipherText.charAt(0);
    var decryptedString;
    cipherAlphabet = rotateToPosition(signalCharacter, indexCharacter, plainAlphabet, cipherAlphabet);
    for (var count = 1; count&lt;cipherText.length; count++)
    {
        var singleLetter = cipherText.charAt(count);
        var i = cipherAlphabet.indexOf(singleLetter);
        decryptedString = decryptedString + plainAlphabet[i];
    }
    return decryptedString;
}
</code></pre>

<p>I'm looking for word JAVASCRIPT as a result but i get 'undefinedJAVASCRIPT' is that because when the first loop is being carried out there is no value assigned to decryptedString? is there a way to go around it? Thanks.</p>
