Solution for "trim string from javascript"

var str=" I have outer spaces "; var cleanStr=str.trim();//trim() returns string with outer spaces removed

javascript trim

//use trim() on your string. It removes first and last whitepsaces let str = " aa bb "; console.log(str.trim()); // "aa bb"

javascript remove first space in string

Similar codes for "trim string from javascript"


Latest 'Javascript' questions

Added before "trim string from javascript"