Without using the split reverse and join functions, how would one do such a thing?
The Problem Given: Reverse the words in a string Sample Input: "Hello World" Sample Output: "World Hello"
<script>
var newString = "";
var theString = prompt("Enter a Phrase that you would like to reverse (Ex. Hello world)");
newString = theString.split(" ").reverse().join(" ")
document.write(newString);
</script>