check string corresponde a uma matriz de string fornecida em javascrpit

i tentando combinar minha string com uma matriz de string fornecida, mas este código abaixo não está funcionando, é alguma sugestão pode ser de ajuda, abaixo do código é o que eu tentei

let myLongString = 'jkjdssfhhabf.pdf&awersds=oerefsf';
let matcherArray = ['.pdf', '.jpg'];

if (myLongString.match(matcherArray)) {
    return true;
} else {
    return false;
}

saída esperada étrue. existe alguma solução melhor para resolver esse tipo de pergunta obrigado.

questionAnswers(3)

yourAnswerToTheQuestion