Write a program to check whether a given number is a
palindrome or not?

Answer Posted / riddhi

<html>
<head>
<script language="Javascript">
var a;
</script>
<title> Number Palindrom </title>
</head>
<body>
<script Language="Javascript">
var rno=0;
var r=0;
var no = prompt("Enter First no: ","10");
var ono = parseInt(no);
while (no>0)
{
r = parseInt(no%10);
rno = parseInt((rno*10)+r);
no = parseInt(no/10);
}
document.write(rno);
if(rno == ono)
{
document.write(ono+" is palindrom number..");
}
else
{
document.write(ono +" is not palindrom number..");
}
</script>
</body>
</html>

Is This Answer Correct ?    72 Yes 39 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which keyword is used to print the text in the screen?

626


What does 3+4+"7" evaluate to?

474


How to get the type of arguments passed to a function?

527


What are the ways of making comments in javascript?

451


What is the difference between remove() and removeChild()?

498






How to accessing elements using javascript?

538


all possible test cases for normal number field,name field date field,check box,

940


How to count the number of element in an array using javascript?

550


Please write the Code of simple javascript calculator withot eval() function

1488


What is an object in javascript, give an example?

519


Which javascript is best?

509


To set all checkboxes to true using javascript?

557


Explain hoisting in javascript?

650


What are the valid scopes of a variable in JavaScript?

484


What is built in function in javascript?

501