/*
* Programming Quiz: Using Sets (3-1)
*
* Create a Set object and store it in a variable named `myFavoriteFlavors`. Add the following strings to the set:
* - chocolate chip
* - cookies and cream
* - strawberry
* - vanilla
*
* Then use the `.delete()` method to remove "strawberry" from the set.
*/
1 回答
已采纳
千秋此意
TA贡献158条经验 获得超187个赞
let myFavoriteFlavors = new Set(); myFavoriteFlavors.add('chocolate chip'); myFavoriteFlavors.add('cookies and cream'); myFavoriteFlavors.add('strawberry'); myFavoriteFlavors.add('vanilla'); myFavoriteFlavors.delete('strawberry'); console.log(myFavoriteFlavors);
添加回答
举报
0/150
提交
取消