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("")}}
Given:
var someString = "Hello World!";
var reversedString = someString.split("").reverse().join("");
Test it out below!
{{someText.split("").reverse().join("")}}
No comments:
Post a Comment