Reverse Sentence

Run Settings
LanguageJavaScript
Language Version
Run Command
function reverseSentence(str){ let word='', reverseSen=''; for(let x=0; x<str.length; x++){ // console.log(str[x]) if(str[x]===" "){ reverseSen=word+" "+reverseSen; word='' } else{ word+=str[x]; } } return word+" "+reverseSen; } console.log(reverseSentence("I am Pooja I will crack CT"));
Editor Settings
Theme
Key bindings
Full width
Lines