Check out example codes for "jump script unity 2d". It will help you in understanding the concepts better.

Code Example 1

GetComponent<Rigidbody2D>().AddForce(new Vector2(0,10), ForceMode2D.Impulse);

Learn ReactJs, React Native from akashmittal.com