There is a list of strings and I want to check if the one I check has a value from there.
For example, the list is "good", "amazing", "bad", "better", "worse"
and this function:
checkPositive = (str) => {
if(str === "good" || str === "amazing" || str === "better") {
return true;
}
return false;
}
My question is if it's possible to do it more efficiently than it is now, I don't like how that if statement looks.