Last active
January 22, 2017 05:35
-
-
Save hackjutsu/eaee28b85282bf8235082e55c3966ae4 to your computer and use it in GitHub Desktop.
Convert js Set to Array
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
// using Array.from | |
let array = Array.from(mySet); | |
// simply spreading the Set out in an array | |
let array = [...mySet]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment