
- Underscore.JS 教程
- Underscore.JS - 首頁
- Underscore.JS - 概述
- Underscore.JS - 環境設定
- Underscore.JS - 迭代集合
- Underscore.JS - 處理集合
- Underscore.JS - 迭代陣列
- Underscore.JS - 處理陣列
- Underscore.JS - 函式
- Underscore.JS - 對映物件
- Underscore.JS - 更新物件
- Underscore.JS - 比較物件
- Underscore.JS - 實用程式
- Underscore.JS - 鏈式呼叫
- Underscore.JS 實用資源
- Underscore.JS - 快速指南
- Underscore.JS - 實用資源
- Underscore.JS - 討論
Underscore.JS - 更新物件
Underscore.JS 有很多易於使用的方法,有助於更新物件。本章將詳細討論這些方法。
Underscore.JS 提供了各種方法來處理物件更新,如下所示 −
序號 | 方法和語法 |
---|---|
1 | extend
_.extend(目標物件,*源物件) |
2 | pick
_.pick(物件,*鍵) |
3 | omit
_.omit(物件,*鍵) |
4 | defaults
_.defaults(物件,*預設值) |
5 | clone
_.clone(物件) |
6 | tap
_.tap(物件,攔擊器) |
7 | has
_.has(物件,鍵) |
8 | property
_.property(路徑) |
9 | propertyOf
_.propertyOf(物件) |
廣告