<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## partition + [link](./partition "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L7979 "View in source.") + [npm](https://www.npmjs.com/package/lodash.partition "See the npm package.") ``` _.partition(collection, [predicate=_.identity]) ``` 創建一個拆分為兩部分的數組。 第一部分是 `predicate` 檢查為真值的,第二部分是 `predicate` 檢查為假值的。 predicate 會傳入3個參數:(value, index|key, collection)。 ### 參數 1. collection (Array|Object) 需要遍歷的集合 2. [predicate=_.identity] (Function|Object|string) 這個函數會處理每一個元素 ### 返回值 (Array) 返回分組元素的數組 ### 示例 ``` var users = [ { 'user': 'barney', 'age': 36, 'active': false }, { 'user': 'fred', 'age': 40, 'active': true }, { 'user': 'pebbles', 'age': 1, 'active': false } ]; _.partition(users, function(o) { return o.active; }); // => 結果: [['fred'], ['barney', 'pebbles']] // 使用了 `_.matches` 的回調結果 _.partition(users, { 'age': 1, 'active': false }); // => 結果: [['pebbles'], ['barney', 'fred']] // 使用了 `_.matchesProperty` 的回調結果 _.partition(users, ['active', false]); // => 結果: [['barney', 'pebbles'], ['fred']] // 使用了 `_.property` 的回調結果 _.partition(users, 'active'); // => 結果: [['fred'], ['barney', 'pebbles']] ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看