Check out example codes for "class and object in oop". It will help you in understanding the concepts better.

Code Example 1

GREDSTEDTRDTDY

Learn ReactJs, React Native from akashmittal.com