Learning JavaScript? Download my free JavaScript Handbook 🔥

Return a new string with removed white space from the beginning and the end of the original string

'Testing'.trim() //'Testing'
' Testing'.trim() //'Testing'
' Testing '.trim() //'Testing'
'Testing '.trim() //'Testing'

Edit this page


Here's my latest YouTube video. I talk about work/life balance as a developer: