const cantPrintStatus = ['0','3','4','5','9']; const regex = new RegExp(cantPrintStatus.join("|")); let FG_FINAL = '0'; regex.test(FG_FINAL); //true let FG_FINAL = '1'; regex.test(FG_FINAL); //false