JSFiddle - React, Tailwind, and code Playground JavaScript var str = "how are you"; alert(str.split(" ").reverse().join(" "));