Skip to content

Instantly share code, notes, and snippets.

@akirattii
Created June 24, 2016 23:01
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 akirattii/d30934e62064b5826005ac61529f2e0b to your computer and use it in GitHub Desktop.
Save akirattii/d30934e62064b5826005ac61529f2e0b to your computer and use it in GitHub Desktop.
配列操作のsnippets
// 配列の重複を削除
var arr = ["", "", "hoge", "baa", "hogege", "", "foo", "", ""];
var newArr = arr.filter((x, i, self) => self.indexOf(x) === i);
// newArr -> ["", "hoge", "baa", "hogege", "foo"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment