I am old. Most of my career was writing JavaScript. I will never go back to that for less than $500,000 salary. The sad reality behind JavaScript is that there are many amazing projects that come from JavaScript developers and almost all of them are either hobby projects or businesses that started as hobby projects.
In the corporate world nobody can write JavaScript. JavaScript employment is filled with pretenders that cannot writing original applications. Everything is layers of frameworks, millions of NPM dependencies, and nonsense so that the incapable can participate. I got tired of the insanity, the mountain of code just to put text on screen, the slow pace of progress, the constant regression, peers who cannot retain employment for than 18 months, people fulfill of opinions they will die to protect while measuring nothing, and so forth.
Now I do API management. Its so much better, and that's really sad because I super love writing JavaScript/TypeScript applications.