I just needed to prove something to myself.
Here is your reversed sentence:
Here is the code:
$(document).ready(function(){
$("#ReverseButton").click(function () {
var myStr = $("#textbox").val();
$("#newTxt").text(reverseMe(myStr));
});
});
reverseMe = function (str) {
var strList = parseString(str, " ");
var tmpStrList = new String();
for (i = strList.length-1; i >= 0; i--) {
tmpStrList += strList[i] + " ";
}
return tmpStrList;
}
parseString = function (str, del) {
var myStringList = str.split(del);
return myStringList;
}
