How to rotate a transform on Vector3. (Javascript)

So I am spawning in a block called riverPiece (not in script) and its location and rotation are under riverBegin. I need to be able to change the rotation so that it is randomly either 90 or -90.

if(xzDecision == ("Z"))
{
riverBegin = Vector3((Random.value <= 0.5) ? 45 : -45, 0, Random.Range(-5,5) * 10);
}
else if(xzDecision == ("X"))
{
riverBegin = Vector3(Random.Range(-5,5) * 10, 0, (Random.value <= 0.5) ? 45 : -45);
}

I don’t know where to enter or what to enter for the rotation part of the script.

If I’m understanding what you’re saying correctly, you want to know how to rotate an object to a certain degree? If so, try:

riverPiece.gameObject.transform.Rotate(0,0,0); //Insert your own values

you really didn’t give us the whole script so it would be harder to help you any further without more information