gpt4 book ai didi

javascript - 检查数组是否唯一

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

<分区>

Possible Duplicate:
Javascript: Determine whether an array contains a value

var thelist = new Array();
function addlist(){
thelist.push(documentgetElementById('data').innerHTML);
}

如何检查我推送的数据是否已存在于数组 thelist 中?

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