I have the next js code that checks some name in my url, but I can't figure how to check more than one. I want to verify six names if they appear in the url, and I don't want to type this code for 6 times.
Is there a way to introduce more than one name in the if line?
Thanks!
$(document).ready(function(){
var urlSrtring = window.location.href;
if (urlSrtring.indexOf('bogdan') !== -1) {
alert('bb')
}
}
)