DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
javascript remove space from two side of string
const string = " this contains spaces "; string.replace(/s{2,}/g, '').trim()
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#javascript
#remove
#space
#side
#string
ADD COMMENT
Topic
COMMENT
Name
2+8 =
Submit