Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// 配列(重複してるし、順番もバラバラ)
var a = [5,2,3,1,3,2,2];
// 重複を削除し、並び替える
var b = a.filter(function (x, i, self) {
return self.indexOf(x) === i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.