---
title: "Discussion on \".filter() method in JavaScript\" | Hashnode"
description: "Discussion on \".filter() method in JavaScript\". While working with an array, we may frequently only need a part of its items rather than the entire array. So, we may apply the .filter() method to an array to retrieve certain specific desired elements.\n.filter() method\nIn JavaScript, the .filter() ..."
url: "https://hashnode.com/posts/filter-method-in-javascript/6408abdecffbaac2ac6209dd"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [.filter() method in JavaScript](https://swetaagarwalla.hashnode.dev/filter-method-in-javascript?utm_source=hashnode&utm_medium=feed)

While working with an array, we may frequently only need a part of its items rather than the entire array. So, we may apply the .filter() method to an array to retrieve certain specific desired elements. .filter() method In JavaScript, the .filter() ...

Mar 8, 2023 · 3 min read · swetaagarwalla.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#filter-in-js](https://hashnode.com/tag/filter-in-js)
-   [#filter](https://hashnode.com/tag/filter)

## Written by

[Sweta Agarwalla](https://hashnode.com/@sweta1331)

@sweta1331 · Baripada, Odisha

  
[View profile](https://hashnode.com/@sweta1331)

Frontend Developer

## Responses 1

Markdown supported · ⌘↵ to post

[Himanshu Kesarwani](https://hashnode.com/@himanshu800)

[Mar 25, 2023](https://hashnode.com/posts/filter-method-in-javascript/6408abdecffbaac2ac6209dd/comment/641ed64905c482464c90c04f)

Well Explained Sweta!

[Sweta Agarwalla](https://hashnode.com/@sweta1331)

[Mar 26, 2023](https://hashnode.com/posts/filter-method-in-javascript/6408abdecffbaac2ac6209dd/comment/641ed64905c482464c90c04f#reply-64203d3a3fa6f95ced3dcc6f)

Thank you.
