I want Object to restart position on X on negative and positive side

Hey Guys,

Right now i have code for object restart when its reach certain position. But this code works only from Negative “X” to Positive “X” position. How can i make it work in both sides?

public class ResetPosition : MonoBehaviour
{
public int maxXPostion;
private Vector3 initialPos;
private Quaternion initialRotation;

void Start()
{
    initialPos = transform.position;
    initialRotation = transform.rotation;
}

void Update()
{
    transform.Translate(Vector3.zero * Time.deltaTime);
    if (gameObject.transform.position.x >= maxXPostion)
    {
        transform.rotation = initialRotation;
        transform.position = initialPos;
    }
}

}

i understand that i need to add:

    if (gameObject.transform.position.x <= maxXPostion)

To existing code. How can i add it correctly so it actually work?

public class ResetPosition : MonoBehaviour {
public int maxXPos;
public int minXPos
private Vector3 initPos;
private Quaternion initRot;

 void Start()
 {
     initPos = transform.position;
     initRotation = transform.rotation;
 }
 void Update()
 {
     transform.Translate(Vector3.zero * Time.deltaTime);
     if (transform.position.x >= maxXPostion || transform.position.x <= minXPosition)
     {
         transform.rotation = initialRotation;
         transform.position = initialPos;
     }
 }
}