I am facing an issue with the following array:
[
about: "INVALID"
team: "VALID"
]
My goal is to determine if the array contains any value of INVALID
and return false
if it does. Here is the code snippet I have attempted:
if (this.forms.indexOf('INVALID') > -1) {
return false;
}
return true;
Despite my efforts, the code does not seem to be working as expected. It always returns true
and I am not able to identify the root cause of the problem.