Quotes help make search much faster. Example: "Practice Makes Perfect"

Sunday, October 20, 2013

#Javascript - How can I reverse a string?


The reverse() method for arrays can be used together with the split() and join() methods to reverse a string.

Given:
var someString = "Hello World!";
var reversedString = someString.split("").reverse().join("");

Test it out below!

{{someText.split("").reverse().join("")}}

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts