Complete the code to add a member to a Redis set.
SADD myset [1]The SADD command adds a member to a Redis set. Here, member1 is the element to add.
Complete the code to check if a member exists in a Redis set.
SISMEMBER myset [1]The SISMEMBER command checks if member1 is in the set myset. It returns 1 if yes, 0 if no.
Fix the error in the code to add multiple unique members to a Redis set.
SADD myset [1]To add multiple members, list them separated by spaces without quotes or commas. Option A is correct.
Fill both blanks to remove a member and then check if it still exists in the set.
SREM myset [1] SISMEMBER myset [2]
SREM removes member1 from myset. Then SISMEMBER checks if member1 is still in the set, which should return 0.
Fill all three blanks to add members, remove one, and check the set size.
SADD myset [1] [2] SREM myset [3] SCARD myset
First, member1 and member2 are added to myset. Then member1 is removed. Finally, SCARD returns the number of members left, which should be 1.