1 | Gets values from middle. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
|
2 | > Alternatives: [middle], [middle$].<br>
|
3 | > Similar: [left], [middle], [right].<br>
|
4 | > This is part of package [extra-array].
|
5 |
|
6 | [extra-array]: https://www.npmjs.com/package/extra-array
|
7 |
|
8 | ```javascript
|
9 | array.middle$(x, [i], [n]);
|
10 | // x: an array (updated)
|
11 | // i: start index (0)
|
12 | // n: number of values (1)
|
13 | // --> x
|
14 | ```
|
15 |
|
16 | ```javascript
|
17 | const array = require('extra-array');
|
18 |
|
19 | var x = [1, 2, 3];
|
20 | array.middle$(x, 1, 1);
|
21 | // [ 2 ]
|
22 |
|
23 | x;
|
24 | // [ 2 ]
|
25 |
|
26 | var x = [1, 2, 3];
|
27 | array.middle$(x, 1, 2);
|
28 | // [ 2, 3 ]
|
29 | ```
|
30 |
|
31 | ### references
|
32 |
|
33 | - [MID$: QBasic 1.1](https://www.qbasic.net/en/reference/qb11/Function/MID_.htm)
|
34 | - [Strings.Mid: Visual Basic](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.mid?view=netframework-4.8)
|
35 | - [Mid: Visual Basic for Applications](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/mid-function)
|
36 |
|
37 | [:running:]: https://npm.runkit.com/@extra-array/middle-update
|
38 | [:package:]: https://www.npmjs.com/package/@extra-array/middle-update
|
39 | [:moon:]: https://www.npmjs.com/package/@extra-array/middle-update.min
|
40 | [:ledger:]: https://unpkg.com/@extra-array/middle-update/
|
41 | [middle]: https://github.com/nodef/extra-array/wiki/middle
|
42 | [middle$]: https://github.com/nodef/extra-array/wiki/middle$
|
43 | [left]: https://github.com/nodef/extra-array/wiki/left
|
44 | [right]: https://github.com/nodef/extra-array/wiki/right
|
45 | [:vhs:]: https://asciinema.org/a/332098
|