MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / checkPalindrome

Function checkPalindrome

Maths/Palindrome.js:59–60  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

57 * const isNotPalindrome = checkPalindrome('hello'); // Returns false
58 */
59const checkPalindrome = (str) =>
60 str.replace(/\s/g, '') === str.replace(/\s/g, '').split('').reverse().join('')
61
62export { PalindromeIterative, PalindromeRecursive, checkPalindrome }

Callers 1

Palindrome.test.jsFile · 0.90

Calls 1

reverseMethod · 0.80

Tested by

no test coverage detected