Enclose in parentheses and negate on the outside.
if(!(obj instanceof Array)) {
//...
}
In this case, the order of precedence is important.
See: Operator Precedence.
The ! operator precedes the instanceof operator.
Enclose in parentheses and negate on the outside.
if(!(obj instanceof Array)) {
//...
}
In this case, the order of precedence is important.
See: Operator Precedence.
The ! operator precedes the instanceof operator.