Toggle navigation
New
Learn
Snippets
Meta
News
About
API Docs
Source Code
Account
Register
Login
Reverse Sentence
main.js
dio.js
✖
tria.js
✖
tessera.js
✖
pente.js
✖
eksi.js
✖
Run Settings
Language
JavaScript
Language Version
latest
Run Command
Snippet Metadata
Owner
sohammalviya65
Created
Modified
Visibility
Public
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
Chrome
Clouds
Crimson Editor
Dawn
Dreamweaver
Eclipse
GitHub
Solarized Light
TextMate
Tomorrow
XCode
Kuroir
KatzenMilch
Ambiance
Chaos
Clouds Midnight
Cobalt
idle Fingers
krTheme
Merbivore
Merbivore Soft
Mono Industrial
Monokai
Pastel on dark
Solarized Dark
Terminal
Tomorrow Night
Tomorrow Night Blue
Tomorrow Night Bright
Tomorrow Night 80s
Twilight
Vibrant Ink
Key bindings
Default
Vim
Emacs
Full width
True
False
Lines
-
Auto
+
Direct link
Raw
Embed