logical error

Hello

I'm using Visual Studio with PlatformIO to build my Arduino UNO programs.

I have the follwing code:

#define downPin 8
boolean downState = digitalRead(downPin);
byte j = 124;
if(downState == HIGH && !j == 4)

I get the error

"message": "logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]",

The error marks the !j == 4 as the error

BR
Manuel

Just after posting I have found the solution

it is j != 4 insted of !j == 4

BR

Mecanicles:
Just after posting I have found the solution

it is j != 4 insted of !j == 4

BR

Or !(j == 4).

Please remember to use code tags when posting code