| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
startsWith Method (String) (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
871def4a-0f96-4675-b6ff-2349f4996511 |
2 |
mikejo5000 |
mikejo |
ghogen |
Returns a value that indicates whether a string or substring starts with another specified string.
stringObj.startsWith(str, [, position]); stringObj
Required. The string object to search against.
str
Required. The search string.
position
Optional. The position of the first character to search against in the string object, starting at 0.
If the string beginning at position starts with the search string, the startsWith method returns true; otherwise, it returns false.
If str is a RegExp, a TypeError is thrown.
[!INCLUDEjsv12]