How do i make an if statment when a var has reached a certain value

When i try to run my code it completely breaks my var.

if clicks: 1000000 {
alert("YOU WIN");
}

I tried what my software recommended and i searched everwhere.

if clicks = 1000000 {
alert("YOU WIN");
} 

I dont know what to do at this point.