I have following html
<div> <div class="first"> First Second </div> <div class="second">Second</div> <div class="third">Third</div> <div>
I want this output after removing white spaces.
First SecondSecondThird
i have used this code
var str = " <div class="first"> First Second </div> <div class="second"> Second</div> <div class="third">Third</div>";
str= str.replace(/\s+/g, " ").trim();
Any idea how it will work. i need this in pure javascript or anglurjs
