Ruby - Arrays
You have two arrays representing user IDs: active_users = [1, 2, 3, 4, 5] and premium_users = [3, 4, 6, 7]. How do you find users who are active but not premium?
You have two arrays representing user IDs: active_users = [1, 2, 3, 4, 5] and premium_users = [3, 4, 6, 7]. How do you find users who are active but not premium?
active_users who are NOT in premium_users.- operator removes elements of the second array from the first, giving non-premium active users.active_users - premium_users to find active but not premium users -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions