Skip to content

Latest commit

 

History

History
11 lines (11 loc) · 207 Bytes

557-reverse-words-in-a-string-iii.md

File metadata and controls

11 lines (11 loc) · 207 Bytes
/**
 * @param {string} s
 * @return {string}
 */
var reverseWords = function(s) {
    return s.split(' ').map(item => {
        return item.split('').reverse().join('');
    }).join(' ')
};