Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to check whether a given number is a
palindrome or not?

Answer Posted / abhijeet gupta

var num=123211;
var str=""+num;
for(var i=0;i<str.length/2;i++){
if(str.charAt(i)!==str.charAt(str.length-1-i)) {
console.log("Not Palindrome");
return;
}
}
console.log("palindrome")

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does question mark mean in react?

854


How to get the contents of an input box using javascript?

1068


Explain javascript accessors ?

908


What is the difference between the operators ‘==‘ & ‘===‘?

985


What is a boolean search?

865


What is the data type of variables of in javascript?

945


Which is faster jquery or javascript?

940


How to write a function in javascript?

920


Can I learn javascript without html?

945


What is the use of type of operator?

938


what does javascript null mean?

968


How do you implement Ajax using hide() function in JQuery?

2266


What is the difference between the keywords var and let?

986


Can you explain the difference between call and apply?

978


What is escape & unescape String functions in JavaScript?

1032