Check out example codes for "unity move left and right". It will help you in understanding the concepts better.

Code Example 1

public float speed = 0.2f

transform.position = new Vector3(transform.position.x+speed,
	transform.position.y, transform.position.z);

Learn ReactJs, React Native from akashmittal.com