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

splice documentation change? #7335

Open
joemckay5 opened this issue Oct 27, 2024 · 1 comment
Open

splice documentation change? #7335

joemckay5 opened this issue Oct 27, 2024 · 1 comment

Comments

@joemckay5
Copy link

Topic

I find it confusing that splice is used to add and also remove something from an array. I know this is a Javascript problem not a P5 problem, but the p5 documentation only describes the adding feature, not the removing.
It would be great if the documentation could include this.
splice(listName, 0, 1) // adds "0" to the listName array at position 1.
listName.splice(0, 1); //removes one item from the array at position 0.

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

No branches or pull requests

2 participants
@joemckay5 and others