var links = [
{ name: "1", url: "#" },
{ name: "2 ", url: "#" },
{ name: "3", url: "#" },
{ name: "4", url: "#" },
{ name: "5", url: "#" }
];
这么一个数组,我用了两层for in才取到里面的值
能否用map取到里面的name和url值呢
var links = [
{ name: "1", url: "#" },
{ name: "2 ", url: "#" },
{ name: "3", url: "#" },
{ name: "4", url: "#" },
{ name: "5", url: "#" }
];
这么一个数组,我用了两层for in才取到里面的值
能否用map取到里面的name和url值呢
10 回答11.3k 阅读
5 回答4.9k 阅读✓ 已解决
4 回答3.2k 阅读✓ 已解决
2 回答2.8k 阅读✓ 已解决
3 回答2.4k 阅读✓ 已解决
3 回答2.2k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决