> But as someone interested in their career, it makes no sense to focus on a language or technology that is not popular
A: why in gods name B: Every language, every framework and every tech stack is 1 month to 5 years away from being legacy crap. Unless you're learning something like KOBOL it's better to be able to use a variety of languages and show that you can adapt.
Java has been around and popular in the enterprise since 2002 and .Net not too far behind. JavaScript will survive the heat death of the universe.