I am trying to use Prototype and startsWith but I want to check a number of values and little confused how to do this.
Basically have this code:
if(Category.startsWith(“[Test1] ” ||
“Test ” || “Test2 “)) { some stuff }
It doesn’t appear to be working and just wondering what I am doing wrong ?
You need to do them individually:
In JavaScript, the expression
…evaluates to
"[Test1] ", because||returns the first “truthy” operand.