Skip to content
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

Implementation of Array.prototype.{shift(), unshift(), reverse()} #67

Merged
merged 4 commits into from
Jul 9, 2019

Conversation

calluw
Copy link
Contributor

@calluw calluw commented Jul 8, 2019

The PR implements the following prototype methods for Array objects:

  • Array.prototype.reverse ( ) - The elements of the array are rearranged so as to reverse their order. The object is returned as the result of the call.
  • Array.prototype.shift ( ) - The first element of the array is removed from the array and returned.
  • Array.prototype.unshift ( ...items ) - The arguments are prepended to the start of the array, such that their order within the array is the same as the order in which they appear in the argument list.

More items to tick off the list for #36 Implement Array prototype methods.
This PR may conflict with testing effort being made as part of #63 Unit testing for Array and String.

@jasonwilliams
Copy link
Member

works well! really conforms to the spec also

@jasonwilliams jasonwilliams merged commit 9e6389e into boa-dev:master Jul 9, 2019
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 this pull request may close these issues.

2 participants