Write a program to check whether a given number is a
palindrome or not?
Answer Posted / kamal kumar
<script>
function bon()
{
var y="";
var j= document.getElementById("ty").value;
var k = j.split('');
for(var l= k.length; l>0; l--)
{
y+=k[l-1];
}
if(j==y)
{
alert("This is Palidrome");
}
else
{
alert("This not Palidromn");
}
}
</script>
<body>
<input type="number" id="ty">
<button onclick=" bon()"> Come On!</button>
</body>
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you include a comment in javascript?
How to create the namespace in javascript?
How do you clear an array in javascript?
What is the reason for wrapping the entire content of a javascript source file in a function book?
How to get value from dropdown (select) control?
What are exports & imports?
How to get an element by class in javascript ?
How do we add javascript onto a web page?
What is difference between javascript and jscript?
Difference between Client side JavaScript and Server side JavaScript?
What is a closure javascript?
Name some of the ways in which Type Conversion is possible?
How to make a array as a stack using javascript?
How do we get javascript onto a web page?
Why is javascript so hard?