Answers for "how to convert string to lover and remove space in js"

2

javascript remove space from string

const removeSpaces = str => str.replace(/\s/g, '');

// Example
removeSpaces('hel lo wor ld');      // 'helloworld'
Posted by: Guest on July-03-2020
1

trim nodejs sentence from spaces

newString = string.replace(/\s+/g,''); // "thiscontainsspaces"
Posted by: Guest on June-10-2021

Code answers related to "how to convert string to lover and remove space in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language