标签:ada 链接 箭头函数 http 函数 asc use nbsp map
var users = [ { name: ‘Jack‘, age: 21 }, { name: ‘Ben‘, age: 23 }, { name: ‘Adam‘, age: 22 }, ]; console.log( users.map(function(user) { return user.age; }) ); // [21, 23, 22] var users = [ { name: ‘Jack‘, age: 21 }, { name: ‘Ben‘, age: 23 }, { name: ‘Adam‘, age: 22 }, ]; console.log(users.map(user => user.age)); // [21, 23, 22]
标签:ada 链接 箭头函数 http 函数 asc use nbsp map
原文地址:https://www.cnblogs.com/Longhua-0/p/9189243.html