-
-
Save fahdi/a75c2ae41e8db9f182d2359c255393ba to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fadawif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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