- 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 | each
_.each(list, iteratee, [context]) |
| 2 | map
_.map(list, iteratee, [context]) |
| 3 | reduce
_.reduce(list, iteratee, [memo], [context]) |
| 4 | reduceRight
_.reduceRight(list, iteratee, [memo], [context]) |
| 5 | find
_.find(list, predicate, [context]) |
| 6 | filter
_.filter(list, predicate, [context]) |
| 7 | where
_.where(list, properties) |
| 8 | findWhere
_.findWhere(list, properties) |
| 9 | reject
_.reject(list, predicate, [context]) |
| 10 | every
_.every(list, [predicate], [context]) |
| 11 | some
_.some(list, [predicate], [context]) |
廣告