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 the difference between let, var, and const?
What output will this program produce System.out.println(x+"+"+y+"="+(x+));
How can javascript language be separated from objects?
What is the need of javascript?
How to detect the OS on the client machine in JavaScript?
Difference between window.onload and onDocumentReady?
What’s relationship between javascript and ecmascript?
Is javascript faster than asp script?
How can javascript codes be hidden from old browsers that don't support javascript?
Where can I learn javascript?
How onclick works in javascript?
Why javascript is fast?
Is Javascript a Functional Programming Language?
hi iM rahul.my questions is my project is a web based & developed using java,jsp. when i record it using qtp what script i will get like either browser("jdfjkf").page("nkf").... or javawindow("f d ").javaedit("Dasf").... plz clarify my doubt asap and i also need some vbscipt of java coding?
Does spacing matter in javascript?