ltrim (JavaScript)

Removes white space from the left end of a string.

Defined in

String (Standard - JavaScript)

Syntax

ltrim() : 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()