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
What do you mean by ide?
What are data structures in javascript?
How to calculate fibonacci numbers in javascript?
java pgm for compare two vesion and print the greatest version on the console. e.g: like 1.4.2 and 1.5.2 biggest is 1.5.2 1.2.5 and 1.2.8 biggest is 1.2.8
What does the enableviewstatemac setting in an aspx page do?
What will be the output of the following statements?
How to delete an array entry using javascript?
What is the difference of "settimeout" function and setinterval functions in javascript
What is the difference between a web-garden and a web-farm?
Explain spread operator in javascript?
What is the use of anonymous function in javascript?
How do I use an external javascript file?
How to open url in a new tab in javascript?
what is function of stdio.h
What is closure?