DEV Community

Mehul Lakhanpal
Mehul Lakhanpal

Posted on • Originally published at


Check if a string is Palindrome

const isPalindrome = (str) => str === str.split("").reverse().join("");

isPalindrome("codedrops"); // false
isPalindrome("racecar"); // true
Enter fullscreen mode Exit fullscreen mode

Thanks for reading 💙

Follow for daily posts.


Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript

Top comments (0)

Visualizing Promises and Async/Await 🤓

async await

☝️ Check out this all-time classic DEV post on visualizing Promises and Async/Await 🤓