JavaScript String method: startsWith()
[this page | pdf | back links]
The startsWith() method (when applied to a
JavaScript
string) returns
true if the string starts with a specified string, otherwise returns false.
It
has the following syntax with the following parameters:
string.startsWith(searchvalue,startposition)
|
Parameter
|
Required / Optional
|
Description
|
|
searchvalue
|
Required
|
Value to be searched
for
|
|
startposition
|
Optional
|
(default is 0).
Position in underlying string from which to search from
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript String Variables