showing results for - "javascript remove spaces at the beginning of the end of the string"
Jadon
19 May 2017
1const stringWithSpaces = '   I learn JS with Coderslang every day   ';
2
3console.log(stringWithSpaces.trimStart());  //'I learn JS with Coderslang every day   '
4console.log(stringWithSpaces.trimEnd());    //'   I learn JS with Coderslang every day'
5console.log(stringWithSpaces.trim());       //'I learn JS with Coderslang every day'