https://www.hackerrank.com/domains/tutorials/30-days-of-code is a good start to learning code or freecodecamp (more options and things are broken down into smaller 5-10 minute problems with videos, unlimited retries, forum, ask for help section, and it's free!)
the best tip to study code is reading documentation and understanding it by writing it and compiling it. you have to keep using it to get a true understanding of how to use it. coding is very hands on and you only get better the more you do it