trim()method that removes leading and trailing whitespace. Here’s what you need to know.
trim() method that you can use to can use to remove leading and trailing whitespace from a string.
let str = ' hello world '; str.trim(); // 'hello world' str = 'hello world '; str.trim(); // 'hello world'
trim() method removes all whitespace characters, not just spaces. That includes tabs and newlines.
let str = '\thello world\n'; str.trim(); // 'hello world'
The trim() does not affect the value of the String itself.
📺 The video in this post was made by Programming with Mosh
The origin of the article: https://www.youtube.com/watch?v=09BwruU4kiY&list=PLTjRvDozrdlxEIuOBZkMAK5uiqp8rHUax&index=6
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
Does your business need an interactive website or app?
The technology used to develop the overall app by the developers from WebClues Infotech is at par with the latest available technology.
For more inquiry click here https://bit.ly/31eZyDZ
Book Free Interview: https://bit.ly/3dDShFg