I have attempted to convert a JS code into C# but in Unity error message error CS1612: Can not modify a value type return value of `UnityEngine.Transform.localEulerAngles'. Consider storing the value in a temporary variable guide me to solve my problem

void Update ()
{

WFL.localEulerAngles.y = W_FL.steerAngle - WFL.localEulerAngles.z;

WFR.localEulerAngles.y= W_FR.steerAngle - WFR.localEulerAngles.z;

}

You can’t modify individual x/y/z components of vectors in Transforms. You have to set the whole vector at once, e.g. like this:

Vector3 oldWFLAngles = WFL.localEulerAngles;
WFL.localEulerAngles = new Vector3(
	oldWFLAngles.x,
	W_FL.steerAngle - oldWFLAngles.z,
	oldWFLAngles.z);

EDIT: spread vector across multiple lines to make it more readable