Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove space

let text = "I     love you"
text = text.replace( / +/g, '_') // replace with underscore ('_')

console.log(text) // I_love_you
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #space
ADD COMMENT
Topic
Name
7+6 =