Skip to content

Instantly share code, notes, and snippets.

Created September 30, 2016 21:53
Show Gist options
  • Save anonymous/6ea48b3aeaa647715da0c0d88812e089 to your computer and use it in GitHub Desktop.
Save anonymous/6ea48b3aeaa647715da0c0d88812e089 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fadawif
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
<script id="jsbin-javascript">
var i = [
1029,
1008,
1040,
1019,
1030,
1009,
1041,
1020,
1031,
1010,
1042,
1021,
1030,
1008,
1045,
1019,
1032,
1009,
1049,
1022,
1031,
1010,
1042,
1021,
];
var uIds = new Set(i);
console.log([...uSet].length); // Back to array
</script>
<script id="jsbin-source-javascript" type="text/javascript">var i = [
1029,
1008,
1040,
1019,
1030,
1009,
1041,
1020,
1031,
1010,
1042,
1021,
1030,
1008,
1045,
1019,
1032,
1009,
1049,
1022,
1031,
1010,
1042,
1021,
];
var uIds = new Set(i);
console.log([...uSet].length); // Back to array
</script></body>
</html>
var i = [
1029,
1008,
1040,
1019,
1030,
1009,
1041,
1020,
1031,
1010,
1042,
1021,
1030,
1008,
1045,
1019,
1032,
1009,
1049,
1022,
1031,
1010,
1042,
1021,
];
var uIds = new Set(i);
console.log([...uSet].length); // Back to array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment