add highliting
This commit is contained in:
parent
291b5c05b9
commit
2cccadc5ee
1 changed files with 2 additions and 2 deletions
|
@ -371,8 +371,8 @@ alert( "Widget".includes("id", 3) ); // false, from position 3 there is no "id"
|
|||
The methods [str.startsWith](mdn:js/String/startsWith) and [str.endsWith](mdn:js/String/endsWith) do exactly what they say:
|
||||
|
||||
```js run
|
||||
alert( "Widget".startsWith("Wid") ); // true, "Widget" starts with "Wid"
|
||||
alert( "Widget".endsWith("get") ); // true, "Widget" ends with "get"
|
||||
alert( "*!*Wid*/!*get".startsWith("Wid") ); // true, "Widget" starts with "Wid"
|
||||
alert( "Wid*!*get*/!*".endsWith("get") ); // true, "Widget" ends with "get"
|
||||
```
|
||||
|
||||
## Getting a substring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue