remove empty characters from end of string js code example Example: javascript whitespace strip yourvariable.trim()