var text = "this is a \n text \t.";Runtime:
text = text.replace(/ /g,'');
console.log(text);
thisestunthe character g defines the repetition of the search through the entire string. This regular expression removed white space but left line breaks and \t.
text.
text = text.replace(/\s/g,'');Execution:
thisisuntext.
Please disable your ad blocker and refresh the window to use this website.