gpt4 book ai didi

javascript - 为什么 android 的代码在 IOS 中不起作用?

转载 作者:行者123 更新时间:2023-11-30 05:08:28 25 4
gpt4 key购买 nike

所以我有一个代码可以在 android 上运行,而在 IOS 上则不能。此代码使用 javascript 区分 HTML 的 select 标记内的列表。

Android 的代码怎么可能在 IOS 上不起作用。

有人可以帮我解决这个问题吗?

         var list = $scope.test_.filter((x,i,a) => a.findIndex(y => y.member_type === x.member_type) == i);            
$scope.list_ = list;

问候。

IT 说 SYNTAX ERROR: Unexpected Token '>'

最佳答案

您的浏览器似乎不支持箭头功能。尝试改用常规函数:

  var list = $scope.test_.filter(function (x, i, a) {
return a.findIndex(function (y) {
return y.member_type === x.member_type;
}) == i;
});
$scope.list_ = list;

关于javascript - 为什么 android 的代码在 IOS 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54123684/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com