Check out example codes for "unity input get axis". It will help you in understanding the concepts better.

Code Example 1

float movement = Input.GetAxis("Horizontal") * speed;

Learn ReactJs, React Native from akashmittal.com