
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
`slice(1, -1)`って何してるの - 回文の真偽判定を再帰的に解く - Qiita
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
`slice(1, -1)`って何してるの - 回文の真偽判定を再帰的に解く - Qiita
function isPalindrome (str) { let len = 0; // remove non-alphanumeric characters and // change th... function isPalindrome (str) { let len = 0; // remove non-alphanumeric characters and // change the string to lowercase // and get the length of the string str = str.replace(/[^a-z0-9]/i, '').toLowerCase(); len = str.length; // calculate the string midpoint position and // loop through the characters up to the midpoint // comparing characters in corresponding positions // from the start of the stri