JSchallenger

Creating Javascript Sets

Viewed: 182
Attempted: 49
Solved: 7
// Write a function that takes three elements of any type as arguments
// Create a Set from those elements
// Return the result

function myFunction() {

return
}
Test Cases:
myFunction(1, 'b', 3)
Expected
new Set([1, 'b', 3])
myFunction(NaN, null, false)
Expected
new Set([NaN, null, false])
myFunction('a', ['b'], { c: 3 })
Expected
new Set(['a', ['b'], { c: 3 }])