How to use 'palindromic graph' in JavaScript

Every line of 'palindromic graph' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
7function isPalindromic(s) {
8 let start = 0;
9 let end = s.length - 1;
10
11 while (start < end && s[start] === s[end]) {
12 start++;
13 end--;
14 }
15
16 return start >= end;
17}

Related snippets