var text = "это \n текст \t.";Runtime:
text = text.replace(/ /g,'');
console.log(текст);
thisestunthe character g определяет повторение поиска по всей строке. Это регулярное выражение удалило пробелы, но оставило переносы строк и \t.
text.
text = text.replace(/\s/g,'');Execution:
thisisuntext.
Please disable your ad blocker and refresh the window to use this website.