Answers for "remove all space in a string in ajavscript"

6

javascript remove all spaces from string

str = str.replace(/\s/g, '');
Posted by: Guest on July-22-2020
3

remove extra space in string js

newString = string.replace(/\s+/g,' ').trim();
Posted by: Guest on May-28-2020

Code answers related to "remove all space in a string in ajavscript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language