Check out example codes for "scratch". It will help you in understanding the concepts better.
Code Example 1
This isn't a true coding language. It's a software for children to learn the basics of coding, despite the many possibilities it holds. If you want to start making games I do not recommend using this, as it is meant for younger beginners.
Code Example 2
Dont use scratch it sucks
Code Example 3
Scratch is basically a programming languages that uses blocks to code things. It's probably the most easiest programing language to learn.
Code Example 4
Learn ReactJs, React Native from akashmittal.com