However, if you have an aptitude for it, you can get a low-paying job (still way more than minimum wage) pretty quickly, so I think it's an investment that pays off rather quickly.
If you don't have an aptitude for it, well... I dunno that it would ever work out no matter what, so I guess there's not much point in talking about that?
But like most things, you have no idea if you have an aptitude for it before you try it.
I do recommend that everyone learn to code. I also recommend that they learn to draw, play music, manage people, and many other skills. It'll make you well-rounded and give you a chance to find out what you really like and excel at, and I've found that most skills are useful in ways that you didn't expect, and you'll use them forever.