Exerpad
Exercise 8 · Chapter: SetsOptional+50 XP

Set Difference

You have two sets:

let setA = new Set([1, 2, 3, 4, 5]);
let setB = new Set([3, 4, 5, 6, 7]);

Print the numbers that are only in setA (not in setB), sorted from smallest to largest.

Expected output
1
2
Need a hint?
3 available · costs 5 XP each
javascript

Output
Run your code to see the output here.