Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc committed Dec 8, 2017
1 parent db8817a commit 5efee5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const arr = slice([1, '2', 3, '4', 5, '6', 7, '8', 9, '0']);
arr['2:5']; // [3, '4', 5]
arr[':-2']; // [1, '2', 3, '4', 5, '6', 7, '8']
arr['-2:']; // [9, '0']
arr['1:5:2']; // ['2', '4']
arr['1:5:2']; // ['2', '4']
arr['5:1:-2']; // ['6', '4']

// for string
const str = slice('1234567890');
str['2:5']; // '345'
str[':-2']; // '12345678'
str['-2:']; // '90'
str['1:5:2']; // '24'
str['1:5:2']; // '24'
str['5:1:-2']; // '64'

```
Expand Down

0 comments on commit 5efee5a

Please sign in to comment.