Check If a String Is a Palindrome

Learn to write a method that checks whether a string is a palindrome.

We'll cover the following

Problem

A string is considered a palindrome if it reads the same when it's reversed. For example, the string racecar is a palindrome that reads the same in both forward and backward directions.

Write a method is_palindrome? that takes a string as a parameter and returns true if the passed string is a palindrome and false otherwise.

Get hands-on with 1200+ tech skills courses.