string trim by ian_smithz May 25, 2017 JavaScript var str = " \n this is a string \n \n \n" console.log(str); console.log(str.trim());