快捷导航

javascript Programming Quiz: Using Sets


/* * 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

letmyFavoriteFlavors=newSet();myFavoriteFlavors.add('chocolatechip');myFavoriteFlavors.add('cookiesandcream');myFavoriteFlavors.add('strawberry');myFavoriteFlavors.add('vanilla');myFavoriteFlavors.delete('strawberry');console.log(myFavoriteFlavors);
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP