Question: JavaScript Can Validate Input Please input a string that is a palindrome: Submit function myFunction() { var x, text; //Get the value of the input

JavaScript Can Validate Input

Please input a string that is a palindrome:

if (!isNaN(x) || x > 'd' || x < 'm') {

text = "Input not valid";

} else {

// text is ok

text = "Input OK";

}

Question 12 options:

function Palindrome(str) {

return str == str.split('').reverse().join('');

}

function Palindrome(str) {

return str == str.split('').join('');

}

function checkPalindrome(str) {

return str != str.split('').reverse().join('');

}

function checkPalindrome(str) {

return str == split('').join('');

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!