JSFiddle - React, Tailwind, and code Playground

Reverse all words in a sentence

by Csaba Hellinger

JavaScript

var r, s = 'This is a sentence';

r = s.split(' ').map(function (word) { return word.split('').reverse().join(''); }).join(' ');

console.log(r);