Update snippet descriptions

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-10-20 23:02:01 +03:00
parent 52880f08ee
commit caa67e2a49
63 changed files with 175 additions and 126 deletions

View File

@ -1,9 +1,9 @@
---
title: intersection
tags: array,math,intermediate
tags: array,intermediate
---
Returns the elements that exist in both arrays.
Returns the elements that exist in both arrays, filtering duplicate values.
- Create a `Set` from `b`, then use `Array.prototype.filter()` on `a` to only keep values contained in `b`.