JSFiddle - React, Tailwind, and code Playground

by j08691

JavaScript

var str = "The   quick brown  fox   jumped over the lazy  dog!";
str = str.replace(/ +/g, " "); 
console.log(str);