Data Structures: Remove items from a set in ES6
This commit is contained in:
parent
4cf17a7425
commit
8eca0e5f25
10
Data Structures/es6SetDelete.js
Normal file
10
Data Structures/es6SetDelete.js
Normal file
@ -0,0 +1,10 @@
|
||||
// https://www.freecodecamp.org/learn/coding-interview-prep/data-structures/remove-items-from-a-set-in-es6
|
||||
|
||||
function checkSet() {
|
||||
// Only change code below this line
|
||||
var set = new Set([1, 2, 3, 4, 5]);
|
||||
set.delete(2);
|
||||
set.delete(5);
|
||||
// Only change code above this line
|
||||
return set;
|
||||
}
|
Loading…
Reference in New Issue
Block a user