Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript palindrome progamming, help please!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello everyone!

Im having a little problem. Im attempting to write a Javascript code that will determine whether or not a five digit number (entered by the user) is a palindrome (a number read the same way forwards as backwards, ie. 12321, 11611, etc.) Can anyone please give me some advice or code? Thanks!
 
This is going o be a string manipulation prob, jus reverse it, then compare - if they are equivalent(==) then they are the same.
b2 - benbiddington@surf4nix.com
 
Jaredn, that's one of the cleanest pieces of code I've seen here! Terrific job!
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top