Palindrome Checker
How do I make an palindrome checker?
What is a palindrome checker? How do you make a palindrome checker? This script and codes were developed by Thomas Weld on 09 January 2023, Monday.
Palindrome Checker - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Palindrome Checker</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <h1>Palindrome Checker with JavaScript</h1> <p>Enter your word below</p> <form id="myForm"> <input id="wordInput" type="text" /> <button>Submit</button> </form> <br /> <div id="answer"></div>
</div> <script src="js/index.js"></script>
</body>
</html>
Palindrome Checker - Script Codes CSS Codes
.container { padding: 40px;
}
Palindrome Checker - Script Codes JS Codes
var myForm = document.getElementById('myForm');
var wordInput = document.getElementById('wordInput');
var answer = document.getElementById('answer');
myForm.addEventListener('submit', function(e){ e.preventDefault(); var userInput = wordInput.value; answer.innerHTML = isPalindrome(userInput);
});
function isPalindrome(userInput){ for ( i = 0; i <= ( userInput.length / 2 ); i++ ) { if ( userInput[i] != userInput[(userInput.length - 1 - i)] ) { return false; } } return true;
}
Developer | Thomas Weld |
Username | thomasweld |
Uploaded | January 09, 2023 |
Rating | 3 |
Size | 1,846 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
FizzBuzz | 1,594 Kb |
Javascript Code Challenge | 1,944 Kb |
Calculator - HTML, CSS, JavaScript | 4,658 Kb |
Fibonacci Sequence JavaScript | 1,421 Kb |
Learnyounode BABY STEPS - es6 solution | 1,410 Kb |
Font Awesome Icon Input Placeholder | 1,351 Kb |
JavaScript Random Number Guessing Game | 1,636 Kb |
Blue button | 1,562 Kb |
IronNews | 2,067 Kb |
Staircase in JavaScript | 1,477 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Tab Menus | Zephyr | 3,180 Kb |
Sencha Touch 2.3.1 Basic Grid Example | Trozdol | 2,770 Kb |
Project MMetro beta | Atomicsong | 5,157 Kb |
Local Weather App - FreeCodeCamp | TrevorWelch | 4,134 Kb |
Simple Responsive Text | Fbrz | 2,282 Kb |
Tester1 | Sasquatchbrawley | 2,001 Kb |
Hover Animation from UNIQLO | Insprd | 3,772 Kb |
Funny menu | AxeLVaisper | 4,671 Kb |
Multi-step GSAP animation | Acacheung | 2,668 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!