---
title: "Discussion on \"Write a javascript program for reversing each word in a given sentence.?\" | Hashnode"
description: "Discussion on \"Write a javascript program for reversing each word in a given sentence.?\". function reverseEachWord(sentence) {\n    const words = sentence.split(' ');  // Split the sentence into words\n    const reversedWords = words.map(word => word.split('').reverse().join(''));  // Reverse each word\n    const reversedSentence = reversedW..."
url: "https://hashnode.com/posts/write-a-javascript-program-for-reversing-each-word-in-a-given-sentence/6563755ba35b347900931c4e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Write a javascript program for reversing each word in a given sentence.?](https://reactonme.hashnode.dev/write-a-javascript-program-for-reversing-each-word-in-a-given-sentence?utm_source=hashnode&utm_medium=feed)

function reverseEachWord(sentence) { const words = sentence.split(' '); // Split the sentence into words const reversedWords = words.map(word => word.split('').reverse().join('')); // Reverse each word const reversedSentence = reversedW...

Nov 26, 2023 · 1 min read · reactonme.hashnode.dev  
Read the article

## Written by

[Murali Chowhan](https://hashnode.com/@Chowhan)

@Chowhan · Hyderabad

  
[View profile](https://hashnode.com/@Chowhan)

Senior Software Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
