YES, YES, A MILLION TIMES YES! This is asked so much here on the subreddit, I decided to add it here. There is no age requirement for learning how to code. You can be 10 years old or 100 years old and learn how to code. It keeps your brain going and you learn more about computers, which is never a bad thing.
There is no time table for learning how to code. You can learn it all in a month or you can take 5 years to learn the basics. No one says you have to do anything X or Y way. Do it your own way.