How to check variable to work as an if statement

I’m basically making a spinning object whenever you click, but…
This is for a mouseclick script, but it doesn’t work,

this.rotation += 90;

if (this.rotation == 90) {
    this.remove();
} 

if(this.rotation == -90){
    this.remove();
}

when i use <= or >= it works, this doesn’t make sense.

if its equals you need to do === not ==

I already tried that, but it doesn’t work

i forget the difference between === and == but in javascript, we generally use ===.

you also might want to check that the clip’s initial rotation is 0. even if it says it is, maybe try deleting the rotation number and then rewriting 0 (maybe there are hidden decimals affecting your if statements).

after doing all that, if it still doesn’t work, maybe something else is up.

Thanks, this is the solution

it turns out I had already set this,rotation as 90 degrees prior