Answers for "remove space infront and behind a string javascript"

13

js remove space before string

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

suppress spaces in front and in the end of a string javascript

var hello = '     Hello there!    ';

// returns "Hello there!"
hello.trim();
Posted by: Guest on October-15-2020

Code answers related to "remove space infront and behind a string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language