Created
April 17, 2016 07:06
-
-
Save DingWeizhe/adea65054ea93d869b0839ea968a8c93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var _res = []; | |
| for (var i in res){ | |
| if (res[i].type == type){ | |
| _res.push(res[i]); | |
| } | |
| } | |
| return _res; | |
| => | |
| res.filter((item) => { return type == item.type; }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment