Shorthand for multiple OR expressions in if statement
you could use an array
if(["","com","net","co","org","info","biz"].indexOf(tld) > -1) {
// do something
}
or if you are using jquery :
$.inArray(tld, ["com","net","co","org","info","biz"])
REF - Performance of OR operation ( || ) vs inArray()
Use a regexp:
if ( /^(com|net|co|org|info|biz)$/i.test(tld) ) {
// do something
}