Update article.md
This commit is contained in:
parent
f57be1bbb3
commit
98507d49ee
1 changed files with 1 additions and 1 deletions
|
@ -379,7 +379,7 @@ There are 3 methods in JavaScript to get a substring: `substring`, `substr` and
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
let str = "stringify";
|
let str = "stringify";
|
||||||
alert( str.slice(0,5) ); // 'string', the substring from 0 to 5 (not including 5)
|
alert( str.slice(0,5) ); // 'strin', the substring from 0 to 5 (not including 5)
|
||||||
alert( str.slice(0,1) ); // 's', from 0 to 1, but not including 1, so only character at 0
|
alert( str.slice(0,1) ); // 's', from 0 to 1, but not including 1, so only character at 0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue