|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
303 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 4 |
|
|---|
| 5 | function dropRight(arr, itemsCount) {
|
|---|
| 6 | itemsCount = Math.min(-itemsCount, 0);
|
|---|
| 7 | if (itemsCount === 0) {
|
|---|
| 8 | return arr.slice();
|
|---|
| 9 | }
|
|---|
| 10 | return arr.slice(0, itemsCount);
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | exports.dropRight = dropRight;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.