I want to reverse the string like this: "How are you" -> "you are How" Those are the code I typed, it could reverse the string , but it still has comma between strings like "you,are,How"
var str = window.prompt("Enter a string"); var tokens = str.split( " " );
document.writeln( tokens.reverse() );