1、map的用法
定义:原数组被“映射”成对应新数组
代码示例:
var users = [ {name: "张含韵", "email": "[email protected]"}, {name: "江一燕", "email": "[email protected]"}, {name: "李小璐", "email": "[email protected]"} ]; var emails = users.map(user=> { return user.email; });
2、filter的用法
原文地址:https://www.cnblogs.com/zjingjing/p/9238073.html
时间: 2024-10-30 01:17:17