rtrim (JavaScript)

Removes white space from the right end of a string.

Defined in

String (Standard - JavaScript)

Syntax

rtrim() : string
Return value Description
string The string with white space removed.

Examples

The following example prints Paris Moscow Tokyo.
var cities = new String("Paris   Moscow   Tokyo   ");
return cities.ltrim()