Write a function which returns the calling string value converted to lowercase without using .toLowerCase : <p>This what I have so far, but I am getting a "Uncaught TypeError: Cannot read property '0' of undefined" error and I can't seem to figure it out. </p>

<pre><code>function second_function(str)
                        {
                            var i;

                            for (i = 0; i &lt; arguments.length; i++)
                            {
                                if(str.codeCharAt[i] &gt;= 65 || str.codeCharAt[i] &lt;= 90)
                                {
                                    str.codeCharAt[i] += 32;
                                }
                            }
                            return str;
                        }
</code></pre>

<p>i = 0 should equal to the first letter. If anyone could help it would be greatly appreciated. Also I have very little to no skills in JavaScript so please bear with me. </p>
