const str = 'The sunset sets at twelve o clock.The sunset sets at twelve o clock.The sunset sets at twelve o clock.The sunset sets at twelve o clock.';
function reverseStringSplitReverse(str) {
return str.split("").reverse().join("");
}
function reverseStringFor(str) {
var newString = "";
for (var i = str.length - 1; i >= 0; i--) {
newString += str[i];
}
return newString;
}
function reverseStringRecursion(str) {
if (str === "")
return "";
else
return reverseStringRecursion(str.substr(1)) + str.charAt(0);
}