let address = 'http://sub.domain2.net/contact/';
if (['https://sub.domain1.com/', 'http://sub.domain2.net/'].includes(address)) {
console.log('match');
} else {
console.log('no match');
}
Here, it verifies if the address
partially matches any of the 2 in the array. Specifically, I aim for it to match the domain tld.
The address http://sub.domain2.net/contact/
should be a partial match with any item in my array.