151-reverse-words-in-a-string
DevGod
Elf Vtuber
/** * @param {string} s * @return {string} */var reverseWords = function(s) { return _.reverse(s.trim().replaceAll(/\s+/g," ").split(" ")).join(" ");};/** * @param {string} s * @return {string} */var reverseWords = function(s) { return _.reverse(s.trim().replaceAll(/\s+/g," ").split(" ")).join(" ");};