# JavaScript filter() method.

`filter()` is a JavaScript method to interact with matrices

`filter()` is a JavaScript method to interact with matrices. This method calls the `callback`function on each element of the `array`and creates a new `array`with all the elements for which the `callback` return returns a true value, the elements that do not meet this `callback` return condition are simply omitted and not They are included in the new `array` .  
For example:

In this example we have an arrangement with 6 emojis, what we will do is delete a specific emoji, and then we will show the arrangement without that emoji.

<iframe src="https://upscri.be/f/788447?as_embed=true" width="700" height="350" frameborder="0" scrolling="no"></iframe>

Assuming we want to eliminate more than one emoji at the same time, we must do it as follows.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1648469121970/UXPHcnQzr.png)

**If the article you liked or you found interesting, please help me with 👏 🤓 You can follow me on Twitter or find me on GitHub by visiting my website.**

[**Francisco Imanol Suarez on about.me**  
*I am a web developer, student, and photographer in Trelew, Argentina. Read my articles.*about.me](https://about.me/franciscoimanol?source=post_page-----9d485c32c21f---------------------- "https://about.me/franciscoimanol?source=post_page-----9d485c32c21f----------------------")[](https://about.me/franciscoimanol?source=post_page-----9d485c32c21f----------------------)
