JSchallenger

Convert a Set to Array

Viewed: 139
Attempted: 40
Solved: 21
// Write a function that takes a Set as argument
// Convert the Set to an Array
// Return the Array

function myFunction() {

return
}
Test Cases:
myFunction(new Set([1, 2, 3]))
Expected
[1, 2, 3]
myFunction(new Set([123]))
Expected
[123]
myFunction(new Set(['1', '2', '3']))
Expected
['1', '2', '3']
myFunction(new Set('123'))
Expected
['1', '2', '3']