Test case details

Preparation Code

const dict = {foo:true}; const set = new Set("foo"); const weakSet = new WeakSet(); const weakKey = {foo: true}; weakSet.add(weakKey);

Test cases

Test #1

const bar = dict["foo"];

Test #2

const bar = set.has("foo");

Test #3

const bar = weakSet.has(weakKey);