I’d like to check if a specific value is in $('.name')
. How can I achieve this? I can’t loop through $('.name'), because I already loop through an array to check if each entry is in $('.name')
. It is possible that my array contains more object than $('.name')
. Here is the code for better understanding:
let arr = ["a", "b", "c"];
let test = $('.name'); // <- contains multiple childs
for (let i = 0; i < arr; i++) {
if (true) { // <- test contains arr[i]
}
}