left (JavaScript)
Gets a substring starting at the left.
Parameters |
Description |
count |
The number of characters to get. |
Return value |
Description |
string |
The substring. |
Usage
This method gets the number of characters
specified by the parameter starting at index 0.
Examples
The following example returns
Paris
.
var cities = new String("Paris Moscow Tokyo Paris");
cities.left(5)
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.