Answers for "remove text remain a space of the end a string in javascript"

10

js remove space before string

var str = "  Some text ";
str.trim();
// str = "Some text"
Posted by: Guest on May-27-2020
1

Delete spaces in text in javascript

var a = b = " /var/www/site/Brand new   document.docx ";

console.log( a.split(' ').join('') );
console.log( b.replace( /\s/g, '') );
Posted by: Guest on October-21-2020

Code answers related to "remove text remain a space of the end a string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language