So I have an array of numbers, let's say `["1", "3", "2"]`

they correspond to values of the data-cardNumber attribute I've given to certain elements.

I want all elements with the data-cardNumber values in the array to be removed.

I tried doing this by iterating through the array and constructing a selector per each item in the array that calls `.remove()`, but that doesn't work.

I think the selector is too complex since it spans multiple strings.

**How can I iterate through the array and `.remove()` all elements with the data-cardNumber attribute whose values are in the array?**

Here is the code that I tried:

```
for(var i=0; i<swipedAwayCards.length; i++){
    $('[data-cardNumber="'+swipedAwayCards[i]'"]').remove();
    // i'm trying to construct a selector like [data-cardNumber="1"]
}

```