Skip to content

Instantly share code, notes, and snippets.

@KevinPy
Created March 29, 2019 16:57
Show Gist options
  • Select an option

  • Save KevinPy/d8e108cd76d733423bcdfb35e634efb9 to your computer and use it in GitHub Desktop.

Select an option

Save KevinPy/d8e108cd76d733423bcdfb35e634efb9 to your computer and use it in GitHub Desktop.

Revisions

  1. KevinPy created this gist Mar 29, 2019.
    4 changes: 4 additions & 0 deletions filter.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    const array = [1, 1, 2, 3, 5, 5, 1]
    const uniqueArray = [...new Set(array)];

    console.log(uniqueArray); // [1, 2, 3, 5]