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


Please Help Members By Posting Answers For Below Questions

what are the differences between as2 and as3?

2920


How to remove duplicates from javascript array?

521


What is unobtrusive javascript?

496


What are the javascript data types?

500


How do I add javascript to chrome?

522






What is spread syntax?

475


What is the === in javascript?

460


How to prevent modification of an object in Javascript?

548


What is the disadvantage of using innerhtml in javascript?

658


Is it safe to use javascript?

501


What are different types of scope chain available in javascript?

447


What is variable typing?

556


What is Unobtrusive JavaScript & Why it's Important?

555


What are the scopes of a variable in javascript?

520


What is the default data type in javascript?

503