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 does javascript work?
How do I get javascript?
What is the use of document object?
Is not a function error in javascript?
Are there any training Institutions on iphone Automation testing?
What is event bubbling in JavaScript?
What are undeclared and undefined variables?
Explain javascript debounce function?
How do you change the style/class on any element using javascript?
How do you submit a form using JavaScript?
How can you identify a function?
Javascript, Pass by Value or Pass by Reference?
What is use strict in javascript?
Write a main method that prompts the user to enter the starting population, birth and death rates, and the number of years. The input birth and death rates cannot be negative, the starting population cannot be less than 2, and the number of years greater than 0. If the user enters an invalid value, this program will prompt user to re-enter the value until a valid value has been read. When all input values are valid, call on the methods above to compute estimated population and print result.
Are namespaces are there in javascript?