I try to look for duplicates in the array and get an error, and I glad for any solution for this problem Attached is code:
let names = itemList[0].getElementsByTagName("span")[0].innerText;
for (i = 1; i < itemList.length; i++) {
if (!(itemList[i].getElementsByTagName("span")[0].innerText in names)) {
names.push(itemList[i].getElementsByTagName("span")[0].innerText);
}
}