:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Scripts >> JavaScript


 PHP interview questions  PHP Interview Questions (660)
 ASP interview questions  ASP Interview Questions (252)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (176)
 VB Script interview questions  VB Script Interview Questions (343)
 JSP interview questions  JSP Interview Questions (100)
 Shell Script interview questions  Shell Script Interview Questions (158)
 Python interview questions  Python Interview Questions (5)
 Tcl interview questions  Tcl Interview Questions (19)
 Awk interview questions  Awk Interview Questions (6)
 AJAX interview questions  AJAX Interview Questions (24)
 Ruby on Rails interview questions  Ruby on Rails Interview Questions (21)
 Scripts AllOther interview questions  Scripts AllOther Interview Questions (48)
Write a program  to check whether a given number is  a
palindrome or not?
 Question Submitted By :: JavaScript
I also faced this Question!!     Answer Posted By  
# 1
This Script checks the given number as well as string is palindrome or not

<script type="text/javascript">
function checkPalindrome() {
var revStr = "";
var str = document.getElementById("str").value;
var i = str.length;
for(var j=i; j>=0; j--) {
revStr = revStr+str.charAt(j);
if(str == revStr) {
alert(str+" -is Palindrome");
} else {
alert(str+" -is not a Palindrome");
<form >
Enter a String/Number: <input type="text" id="str" name="string" /><br />
<input type="submit" value="Check" onclick="checkPalindrome();"/>
Is This Answer Correct ?    151 Yes 28 No
# 2
Is This Answer Correct ?    28 Yes 11 No
# 3
<script language="Javascript">
var a;
<title> Number Palindrom </title>
<script Language="Javascript">
var rno=0;
var r=0;
var no = prompt("Enter First no: ","10");
var ono = parseInt(no);
while (no>0)
r = parseInt(no%10);
rno = parseInt((rno*10)+r);
no = parseInt(no/10);
if(rno == ono)
document.write(ono+" is palindrom number..");
document.write(ono +" is not palindrom number..");
Is This Answer Correct ?    15 Yes 7 No
# 4
num=InputBox ("Enter a number")
rem1=num mod 10
r=(r*10) + rem1


If (r=z)Then
Msgbox "Given no is palindrome"
Msgbox "Given no. is not palindrome"

End If
Is This Answer Correct ?    8 Yes 3 No
Sharma V
# 5
Is This Answer Correct ?    1 Yes 0 No

Other JavaScript Interview Questions
  Question Asked @ Answers
how can we use java script message alert with with useing coding show full process with its coading NIC 1
what is inheritence Wipro 6
Write a program to check whether a given number is a palindrome or not?   5
How can I define an array in JavaScript? Accenture 4
What is the use of the String Tokenizer   1
what is the purpose of using jsp?   1
What is a way to append a value to an array? Satyam 5
What is this keyword? Satyam 8
Difference between scripting language and programming language??   1
Write sample code for pagination using java script.   3
how can we create own web browser? Infosys 1
Describe briefly the major use of java script on client side   1
For more JavaScript Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::