Created
September 11, 2018 16:55
-
-
Save rafagarcia/ac27cba6a0681343dce522b7025025a6 to your computer and use it in GitHub Desktop.
// source http://jsbin.com
This file contains hidden or 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
// sets | |
let arr = [1, 1, 2, 2, 3, 3]; | |
let deduped = [...new Set(arr)] // [1, 2, 3] | |
console.log(deduped); | |
let mySet = new Set([1,2, 3, 4, 5]); | |
var filtered = [...mySet].filter((x) => x > 3) // [4, 5] | |
console.log(filtered) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment