You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
Arthur Guiot edited this page Jul 12, 2017
·
1 revision
How it works?
This function is pretty useful because it will remove a defined amount of items in an array, starting from the right or from the left. Which means that if you give an array ([0, 1, 2, 3, 4, 5]), and you give the number 2, it will return [2, 3, 4, 5]. But if you gave the number -2, it would have returned [0, 1, 2, 3]. If you're understanding that, you'll have no problem using it.
How to use it?
This function will require 2 arguments which are:
array
val, this is the number that will cut the array from the right or from the left.