Exercise 4 · Chapter: SetsRequired+50 XP
Common Friends
You have two sets of friends:
let aliceFriends = new Set(["Bob", "Charlie", "David", "Eve"]); let bobFriends = new Set(["Charlie", "Eve", "Frank", "Grace"]);
Find the friends they have in common and print them sorted alphabetically, one per line.
Expected output
Charlie Eve
Need a hint?
3 available · costs 5 XP each
javascript
Output
Run your code to see the output here.