Palindrome check JAVASCRIPT
<p>i have the following:</p>

<pre><code>function checkPalindrom(palindrom)
{

    for( var i = palindrom.length; i &gt; 0; i-- )
    {
        if( palindrom[i] = palindrom.charAt(palindrom.length)-1 )
        {
            document.write('the word is palindrome.');
        }else{
            document.write('the word is not palindrome!');
        }
    }
}
checkPalindrom('wordthatwillbechecked');
</code></pre>

<p>What is wrong with my code? i want to check if the word is palindrome.</p>
