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
0

remove space from string javascript

var puzzle1=myTrim($("#puzzleinput").val());
            function myTrim(x) {
              return x.replace(/^\s+|\s+$/gm,'');
            }
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