Skip to content

Instantly share code, notes, and snippets.

@gearmobile
Created February 3, 2021 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gearmobile/8f967ad064a26dd38040409cad71f2bd to your computer and use it in GitHub Desktop.
Save gearmobile/8f967ad064a26dd38040409cad71f2bd to your computer and use it in GitHub Desktop.
Найти вхождение элементов одного массива в другом массиве и удалить их оттуда
let arr1 = [1,2,3,4,5];
const arr2 = [4,5];
arr1 = arr1.filter(el => !arr2.includes(el));
console.log(arr1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment