How to check if X Coordinate 1 > X Coordinate 2

Hello everyone, I can’t figure out how to make a script that would check if my object1 X coordinates are bigger(or smaller) than object2 X coordinates. I would really apreciate if someone would lead me to the right direction.

if(go1.transform.positions.x > go2.transform.positions.x){
//go1 X is bigger
}
else{
// go2 X is bigger
}