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

Implement Array.prototype.at() #1596

Closed
jasonwilliams opened this issue Sep 29, 2021 · 4 comments · Fixed by #1613
Closed

Implement Array.prototype.at() #1596

jasonwilliams opened this issue Sep 29, 2021 · 4 comments · Fixed by #1613
Assignees
Labels
E-Easy Easy enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Milestone

Comments

@jasonwilliams
Copy link
Member

ECMASCript feature
https://tc39.es/ecma262/#sec-array.prototype.at

Example code
This is the same feature added for String.prototype.at() - #1375

This code should now work and give the expected result:

const arr1 = [1,5,6,2];
arr1.at(-1) // 2

The expected output is 2.

@jasonwilliams jasonwilliams added enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com E-Easy Easy labels Sep 29, 2021
@nekevss
Copy link
Member

nekevss commented Oct 1, 2021

Hi! I'd definitely be interested in trying to implement this. I'm sort of new to helping with an open source project, should I just make a pull request for array/mod.rs?

@jedel1043
Copy link
Member

jedel1043 commented Oct 1, 2021

@nekevss I've assigned the issue to you.

should I just make a pull request for array/mod.rs?

Yep, pretty much.
You need to fork this repo, then branch, code the changes, commit and create a new PR. Here's an useful guide if you still have some questions about the process :)
https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/

@jedel1043
Copy link
Member

@nekevss Also, if you have any questions about the codebase or if you need some mentoring, ping us and we'll try to help you asap 😊

@nekevss
Copy link
Member

nekevss commented Oct 2, 2021

Hi! I submitted a pull request for the implementation. Hopefully, I didn't do anything wrong or overlook anything.

I could probably use some mentoring in general as I'm mostly self-taught. Although, this issue seemed to be easy enough (knock on wood).

Definitely planning to try and contribute more to boa as it seems like a great way to learn JS/TS at a greater depth WHILE playing around with Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-Easy Easy enhancement New feature or request good first issue Good for newcomers Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants