JSchallenger

Check if value is present in Set

Viewed: 148
Attempted: 22
Solved: 14
// Write a function that takes a Set and a value as arguments
// Check if the value is present in the Set

function myFunction() {

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