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 is the output of 10+20+”30″ in JavaScript?

1168


What is the difference between let and var?

970


What is whitespace in javascript?

935


What is javascript tree shaking?

936


What are javascript closures?

985


What is the difference between childNode and children?

1008


Which software is used for javascript?

889


What is the default scope in javascript?

843


How to enabled 'Strict' mode in JavaScript?

1086


How to write a script for "select" lists using javascript

1020


Is JavaScript case sensitive? Give an example?

973


Explain arrow functions?

895


What is the role of a strict mode in javascript?

934


How can the os of the client machine be detected?

852


What are different types of popup boxes available in javascript?

907