Skip to content

Instantly share code, notes, and snippets.

@mjmeilahn
mjmeilahn / palindrome.js
Last active May 29, 2020 15:46
JS: Palindrome Function
// Takes a single string and returns a boolean whether it is the same forwards or backwards
// EXAMPLE:
// "oscar" -> false
// "aaaa" -> true
// "Racecar" -> true
// "Madam, I'm Adam" -> true
// Args: string
// Return: boolean
const palindrome = str => {