我有以下內(nèi)容:function checkPalindrom(palindrom){ for( var i = palindrom.length; i > 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');我的代碼出了什么問題?我想檢查這個詞是否是回文。
Palindrome檢查Javascript
蝴蝶不菲
2019-09-02 15:16:04