title: How to minimize the execution time?
body: <p>I'm checking if the given string is palindrom or not, but the execution time is too long.</p>
  <p>My code is below:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function checkPalindrome(inputString) {
    for (let i = 0; i &lt; (inputString.length - 1) / 2; i++) {
      const a = inputString[i];
      const b = inputString.split("").reverse().join("")[i];
      if (a !== b) {
        return false;
      }
      continue;
    }
    return true;
  }
  const palindrome = checkPalindrome("abba");
  console.log(palindrome);</code></pre>
  </div>
  </div>
  </p>
  <p>How can I optimize the code in order to reduce it's execution time?</p>