Exercise 6 · Chapter: SetsRequired+50 XP
Fix the Remove
This program tries to remove "mango" from a set, but it calls a method that doesn't exist, so it crashes! Fix it.
Expected output:
3
Need a hint?
3 available · costs 5 XP each
javascript
let fruits = new Set(["apple", "banana", "cherry"]);
fruits.remove("mango");
console.log(fruits.size);
Output
Run your code to see the output here.