As a newcomer to Angular, I am attempting to implement a basic if statement to verify that my property does not match one of 10 specific values. Is there a method or filter within enums or lists that can achieve this easily?
public type: string;
if(type === '1' || type === '2' || type === '3') || type === '4'){
// do something
} else {
//do something else
}
I am searching for a simple solution similar to the following:
if(type not in (1,2,3))
What is the most efficient approach to address this type of scenario for checking against a string?