Skip to content

Instantly share code, notes, and snippets.

@ksakae1216
Created June 19, 2017 11:22
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 ksakae1216/2b020021c5b0d429be1349cc7cafb505 to your computer and use it in GitHub Desktop.
Save ksakae1216/2b020021c5b0d429be1349cc7cafb505 to your computer and use it in GitHub Desktop.
// 配列(重複してるし、順番もバラバラ)
var a = [5,2,3,1,3,2,2];
// 重複を削除し、並び替える
var b = Array.from(new Set(a)).sort();
console.log(b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment