Implement a function isPalindrome that checks if the string is a palindrome

A palindrome is a string that reads the same way even if reverted.

isPalindrome(‘abba’) // true
isPalindrome(‘baba’ // false

An empty string is a palindrome too.

This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task

helper.js

export const isPalindrome = (s) => {
  return false;
}

solution.js

/**
 * Implement a function isPalindrome in helper.js that checks if the string is a palindrome
 *
 * A palindrome is a string that reads the same way even if reverted.
 *
 * isPalindrome('abba') //true
 * isPalindrome('baba'  //false
 *
 * An empty string is a palindrome too.
 * */

import { isPalindrome } from './helper.js';

const s = 'abba';

console.log(isPalindrome(s));