You are moving in the normal direction no matter what.
Its not the correct solution even if you wrapped your code in if else statements because your x positions value may never exactly be 4. Edit: Just noticed that in your question you are checking for equality but in your code you are checking if x is smaller.
Instead you should store the direction you want to move in and pass that to translate. Then check if the position is <= -4. If it is invert your stored direction. Try this instead. I think its the correct syntax for Unityscript. I’m used to C# now;
var speed = 0.5;
var direction = Vector3(-1,0,0);
function Update ()
{
if (transform.position.x < -4)
{
direction = -direction;
}
transform.Translate (direction * Time.deltaTime * speed, Space.World);
}