remove spaces and line breaks javascript

Solutions on MaxInterview for remove spaces and line breaks javascript by the best coders in the world

showing results for - "remove spaces and line breaks javascript"
Chandler
05 Nov 2016
1const originalString = `
2  <div>
3    <p>Hey that's <span>somthing</span></p>
4  </div>
5`;
6
7const strippedString = originalString.replace(/(<([^>]+)>)/gi, "");
8
9console.log(strippedString);