program checking string of characters for capital letters
<p>Ok, i have a function which checks if a letter is upper case and returns 'true' or 'false' value.</p>

<pre><code>function isUpperCase(aCharacter)
        {
            return (aCharacter &gt;= 'A') &amp;&amp; (aCharacter &lt;= 'Z');
        }
</code></pre>

<p>now I would like it to check a string of characters e.g. 'AdfdfZklfksPaabcWsgdf' and after the program encounters capital letter it will execute function decryptWord on all small letters after this letter and until next capital letter and so on. Function decryptWord works fine on single words i just cant get it work on more than one ;(</p>

<pre><code>function decryptMessage(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
    {
        for (var count = 0, count &lt; cipherText.length; count++)
                    {
                    if (isUpperCase(cipherText.charAt(count)))
                    {
                        decryptWord(cipherText, indexCharacter, plainAlphabet, cipherAlphabet)
                    }
                    else //i dont know what to do next

                    }
</code></pre>

<p>can you tell me if i'm going in the right direction?</p>
