how to shred whitespace space in javascript

Solutions on MaxInterview for how to shred whitespace space in javascript by the best coders in the world

showing results for - "how to shred whitespace space in javascript"
Simona
16 Jun 2018
1let str = "       Hello World!        ";
2str.trim()   // Returns "Hello World!"