I was a big fan of ruby, and doing web development, so the pressure was on to learn javascript, which I really wasn't enjoying. Only partly the language, mainly the framework churn.
I was a math major and industrial engineering grad student and did a lot of analytical code in a previous life (numerical recipes in C kind of thing, as well as Java interfacing with ILOG/CPLEX). So I managed to get over to that side of life again.
Ruby isn't big in the scientific computing world, but python is pleasant to work with. The whole thing is a better match for me, kind of glad to be out of web development.
That said, it does limit employment options somewhat. There's enough activity in python/analytics/data science to provide some options, but it's also very popular (a lot of people really want to do ML/AI stuff, so the competition is high). If you really have the front end/full stack javascript thing nailed, my guess is that jobs are very easy to come by