You can learn coding by watching tutorials and practicing and running code repeatedly. Try to build logic behind each code rather than simply copying code. You will get a good command of coding as much as you practice.