# removeAll in p5.js (vs Processing)

**URL:** <https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566>\
**Category:** p5.js\
**Created:** [May 5, 2020, 12:39am UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566 "2020-05-05T00:39:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bassam](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@Bassam](https://discourse.processing.org/u/Bassam)\
**Post date:** [May 5, 2020, 12:39am UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/1 "2020-05-05T00:39:38Z")

</div>

There is a bug in the removeAll() function that has been fixed, but will only be available in the next release.

* * *

**EDIT: moved from Processing thread**

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [May 6, 2020, 10:11am UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/2 "2020-05-06T10:11:42Z")

</div>

I doubt it, but feel free to provide a link! 😉

---

<div class="post-metadata">

**Author:** ![Bassam](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@Bassam](https://discourse.processing.org/u/Bassam)\
**Post date:** [May 6, 2020, 3:48pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/3 "2020-05-06T15:48:39Z")

</div>

@neilcsmith  
Here you go: [https://github.com/processing/p5.js/pull/4414#issuecomment-623583617](https://github.com/processing/p5.js/pull/4414#issuecomment-623583617)

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [May 6, 2020, 4:02pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/4 "2020-05-06T16:02:39Z")

</div>

That’s an unrelated function in an unrelated project!

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 6, 2020, 4:05pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/5 "2020-05-06T16:05:04Z")

</div>

That is interesting! However it is a change in p5.js – not Processing (Java), or processing.js (the Java mode to JS transpiler). For questions in the Processing channel on this forum written in Java syntax, p5.js changes won’t be relevant…

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [May 6, 2020, 4:22pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/6 "2020-05-06T16:22:54Z")

</div>

Since LuckSmith is having problems in OpenProcessing I suspect he is using p5.js not Java

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 6, 2020, 4:33pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/7 "2020-05-06T16:33:51Z")

</div>

We can check in sketch preferences – I should have done that rather than speculating.

Looks like it is written in Java syntax and uses Processing.js.

 ![Screen Shot 2020-05-06 at 9.32.20 AM](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/050e7f981fa7503ac2b2157d60ec9a50481a35cf.png)

---

<div class="post-metadata">

**Author:** ![Bassam](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@Bassam](https://discourse.processing.org/u/Bassam)\
**Post date:** [May 6, 2020, 6:09pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/8 "2020-05-06T18:09:17Z")

</div>

Oh I didn’t realize I was in the Processing forum. This thread came up when the removeElements() wasn’t working in my p5.js sketch.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 6, 2020, 9:55pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/9 "2020-05-06T21:55:23Z")

</div>

Got it – still thanks for sharing. Under each thread title you will see the category – #processing or #p5js , etc.

---

<div class="post-metadata">

**Author:** ![neilcsmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/neilcsmith/32/144_2.png) [@neilcsmith](https://discourse.processing.org/u/neilcsmith)\
**Post date:** [May 6, 2020, 10:06pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/10 "2020-05-06T22:06:39Z")

</div>

> [@quark](#):
>
> Since LuckSmith is having problems in OpenProcessing I suspect he is using p5.js not Java

Besides being in Java syntax on OpenProcessing, the question is mainly about it not working as expected from PDE / on the JVM.

> [@Can't find a mistake or removeAll() doesn't work](https://discourse.processing.org/t/cant-find-a-mistake-or-removeall-doesnt-work/18368/19):
>
> This thread came up when the removeElements() wasn’t working in my p5.js sketch.

Yes, very different issue - this is about `removeAll()` on ArrayLists, and not actually a bug in that.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 6, 2020, 10:48pm UTC](https://discourse.processing.org/t/removeall-in-p5-js-vs-processing/20566/11 "2020-05-06T22:48:51Z")

</div>

[Relocating so we aren’t hammering a two-month old OP thread in the wrong category while hashing this out]
