Adds a test case to ensure undefined values in objects are returned by
the solution function. This test ensures that valid logic is used to
check a key exists in a given object.
if (arr[i] in obj) {...} // will passif (obj[arr[i]] !== undefined) {...} // will now fail
Adds a test case to ensure undefined values in objects are returned by the solution function. This test ensures that valid logic is used to check a key exists in a given object.
if (arr[i] in obj) {...} // will pass
if (obj[arr[i]] !== undefined) {...} // will now fail