user
Write a JavasScript program to reverse all of the words in a given string


assistant
function reverseString(str) {
    let reversedString = '';
    str.split('').forEach(char => reversedString = char + reversedString);
    return reversedString;
}