Skip to content

add pop, shift, unshift to STArray #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hdgarrood opened this issue Dec 5, 2018 · 1 comment · Fixed by #157
Closed

add pop, shift, unshift to STArray #151

hdgarrood opened this issue Dec 5, 2018 · 1 comment · Fixed by #157

Comments

@hdgarrood
Copy link
Contributor

Just like the methods of the same names on a JS Array:

  • pop removes the last item of an array and returns that item
  • shift removes the first item of an array and returns that item
  • unshift takes an item and sets it as the first element of the array, shifting everything else along by 1
@klntsky
Copy link
Contributor

klntsky commented Apr 2, 2019

I'm going to implement this. Should I add unshiftAll as well, similar to pushAll?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants