function reverseSent(sentence){ var result = " "; var splitStr = sentence.split(" "); for (var i = splitStr.length - 1; i >= 0; i--){ result += splitStr[i] + " "; var words = result; } return words; }
function reverseSent(sentence){ var result = ""; var splitStr = sentence.split(" "); for (var i = splitStr.length - 1; i >= 0; i--){ if (i ==splitStr.length - 1) { result += ""; } else { result += " "; } result += splitStr[i];// + " "; var words = result; } return '"' + words + '"'; }
function reverseSent(sentence){ return sentence.split(/\b/).reverse().join('') }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)