---
title: "Discussion on \"JavaScript: Filter array values\" | Hashnode"
description: "Discussion on \"JavaScript: Filter array values\". // Filter array values that are not present in array b \nlet a = [1,2,3,5];\nlet b = [2,1,4,3];\nlet c = a.filter(item => !b.includes(item));\n\nconsole.log(c);\n\nOutput:\n[ 5 ]\n\nExecute above code here"
url: "https://hashnode.com/posts/javascript-filter-array-values/630b6a7343d7308e3e3236d3"
---

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

Discussion

# [JavaScript: Filter array values](https://harikrishna.hashnode.dev/javascript-filter-array-values?utm_source=hashnode&utm_medium=feed)

// Filter array values that are not present in array b let a = \[1,2,3,5\]; let b = \[2,1,4,3\]; let c = a.filter(item => !b.includes(item)); console.log(c); Output: \[ 5 \] Execute above code here

Jan 2, 2022 · 1 min read · harikrishna.hashnode.dev  
Read the article

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

## Written by

[Hari Krishna Anem](https://hashnode.com/@hkrishna)

@hkrishna · Hyderabad, India

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

Full stack developer

Full stack developer (ReactJS, NodeJS, JavaScript, PHP, SQL)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
