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 is closure? Give an example.
How can a page be forced to load another page in javascript?
Is javascript the future?
To set all checkboxes to true using javascript?
What is an immediately-invoked function expression?
what is function of stdio.h
What is spread syntax?
How are event handlers utilized in javascript?
How to select an element by id and swapping an image?
What is the use of blur function in JavaScript?
How to redirect a url using JavaScript?
What are the methods involved in javascript?
Is html and javascript the same?
What is the use of let & const in javascript?
How to write comment in JavaScript?