2021 JavaScript Cheatsheet | trim method()

PHOTO EMBED

Thu Sep 23 2021 01:29:07 GMT+0000 (Coordinated Universal Time)

Saved by @drack669 #javascript

let city = " Montreal  "
city.trim() // "Montreal"
// The trim() method removes whitespace from both ends of a string.
content_copyCOPY

https://www.frontendcheatsheets.com/javascript