Started getting into pure javascipt recently and didn't realize how powerful and useful it is. It's not that I haven't used it before, but I relied more on backend programming in which I just passed everything to the back rather than understanding how much I could do on the frontend before I passed anything to the back.
I try to spend at least 30 minutes a day. Ideally more, but consistency is key – I find it much more beneficial to be looking at code on a daily basis, rather than 'batching' it for one day a week or less.
I’ve never lost motivation, but then I’ve never tried to just learn to code, but rather I’d challenge myself to build something and learn enough to get that thing done.<p>Of course sometimes you’ll be sick or tired or just want some fresh air. Or a week or month off. That’s fine. If you set things up in your head so it’s more of a hobby than a chore I think it will be a lot easier.
Try to find what you enjoy in coding, ex. learn what you want to make and what you're interested in.
P.S. find good ways to motivate yourself while coding, I found that as strange as it sounds making money off RuneScape scripts got me back into it after a long hiatus.
You'll always be learning. I've been coding since grade school and every day I learn something while programming.<p>The best way to stay motivated is to take on tasks/projects that are interesting/new something you haven't done before.<p>You'll learn a lot doing something beyond a tutorial and you'll want to work on it/figure it out.
I have been coding for now 15 years, I still feel like a complete noob and try to assimilate new information every day. The way to keep yourself motivated is to do something that you like. Solve a problem you actually have or create something you want, and in the process try to use whatever it is you need to learn.