---
id: 587d8254367417b2b2512c71
challengeType: 1
videoUrl: ''
title: 从ES6中的集中删除项目
---
## Description
让我们使用delete方法练习从ES6集中delete 。首先,创建一个ES6 Set var set = new Set([1,2,3]);现在使用delete方法从Set中删除一个项目。
```js
function checkSet(){
var set = //Create a set with values 1, 2, 3, 4, & 5
//Remove the value 2
//Remove the value 5
//Return the set
return set;
}
```