Programming Exercises

Create a component that checks if a hardcoded string is a palindrome and displays the result (true or false).

Hard

Problem Statement

Create a component that checks if a hardcoded string is a palindrome and displays the result (true or false).

Sample Input

madam

Sample Output

Is Palindrome: true

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
import React from "react"; const CheckPalindrome = () => { return ( <div> {/* Display whether the string is a palindrome */} </div> ); }; export default CheckPalindrome;
Log in or sign up to run or submit your code.Log inSign up
Input
madam
Expected Output
Is Palindrome: true