|
|
Q1325 Is there any way to reverse a string?
irt.org | Knowledge Base | JavaScript | Text | Q1325 [ previous next ] Q1325 Is there any way to reverse a string?JavaSscript 1.1 has array.reverse() but no string reverse. Try this:
The following was submitted by Lee Kowalkowski You can use split("") to convert a string to an array, reverse() to reverse the array, and join("") to convert it back.
|
-- div -->
|