WeakSet delete() 方法
delete方法可以移除WeakSet指定元素。
如果刪除成功返回true,否則返回false。
更多關於WeakSet內容參閱Set和WeakSet 資料結構一章節。
語法結構:
[JavaScript] 純文字檢視 複製程式碼weaksetObj.delete(obj)
引數解析:
(1).obj:必需,要移除的元素。
程式碼例項:
[JavaScript] 純文字檢視 複製程式碼執行程式碼let ws = new WeakSet(); let webName = new String("螞蟻部落"); let age = new Number(4); ws.add(webName); ws.add(age); console.log(ws.delete(age)); console.log(ws.has(age));
程式碼執行效果截圖如下:
相關文章
- JavaScript Set與WeakSetJavaScript
- WeakMap delete() 方法delete
- Map delete() 方法delete
- Set delete() 方法delete
- URLSearchParams delete() 方法delete
- Sanic delete()方法/函式delete函式
- 【ES6基礎】Set 與 WeakSet
- vage的delete大量資料方法delete
- laravel中delete()方法和destroy()方法的區別Laraveldelete
- 深入理解JavaScript中的WeakMap和WeakSetJavaScript
- zt_vage的delete大量資料方法delete
- 【MyBatis原始碼分析】insert方法、update方法、delete方法處理流程(上篇)MyBatis原始碼delete
- 【MyBatis原始碼分析】insert方法、update方法、delete方法處理流程(下篇)MyBatis原始碼delete
- StringBuffer類的delete()方法和deleteCharAt()方法的區別delete
- c++中new和delete的使用方法C++delete
- delete input 與 delete all inputdelete
- delete OBSOLETE 與 delete expirieddelete
- deletedelete
- 引用、淺拷貝及深拷貝 到 Map、Set(含物件assign、freeze方法、WeakMap、WeakSet及陣列map、reduce等等方法)物件陣列
- delete 和 delete [] 的真正區別delete
- python 使用 delete 方法時報錯,可以正常刪除Pythondelete
- sqlserver update或者Delete誤操作恢復方法---【驗證】SQLServerdelete
- ASP.NET MVC 5 - 查詢Details和Delete方法ASP.NETMVCAIdelete
- oracle恢復表delete/truncate/drop的方法總結Oracledelete
- delete與delete[]需要注意的地方delete
- MySQL防止delete命令刪除資料的兩種方法MySqldelete
- FormData delete()ORMdelete
- URLSearchParams delete()delete
- JavaScript deleteJavaScriptdelete
- DELETE STATISTICSdelete
- rman 中delete 與delete force 的區別delete
- WebApi系列~不支援put和delete請求的解決方法WebAPIdelete
- MySQL Delete PHPMySqldeletePHP
- SQL__DELETESQLdelete
- JavaScript delete用法JavaScriptdelete
- Delete the temp tabledelete
- git delete and revertGitdelete
- RMAN 中delete exipired 和 delete obsolete 的區別delete