Create a component that checks if a hardcoded string is a palindrome and displays the result (true or false).
HardProblem 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
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const CheckPalindrome = () => { return ( <div> {/* Display whether the string is a palindrome */} </div> ); }; export default CheckPalindrome;