Answers for "javascript string remove blank spaces"

22

remove spaces in a string js

str.replace(/\s+/g, '')
Posted by: Guest on April-29-2020
1

how to remove empty spaces befiore string js

const greeting = '   Hello world!   ';

console.log(greeting);
// expected output: "   Hello world!   ";

console.log(greeting.trim());
//your boy siddhesh Kuakde
Posted by: Guest on April-02-2021

Code answers related to "javascript string remove blank spaces"

Code answers related to "Javascript"

Browse Popular Code Answers by Language