JS is not a readable or easy to understand language. Data science is a specialized skill in itself, meaning less time to focus on the code itself, and due to JS’s nature as being the language of the web, it has a lot of quirks and legacy choices built in for better or worse. In comparison Python has 2 significant versions (2, 3) where 3 is being more or less standardize (finally). This, along with the fact Python provides easy to read and understand syntax, while still being very flexible, means its easier to program with its syntax, and thus more time can be devoted to the use-case. This isn’t only true for data science, but it is one of the main driving forces behind Pythons recent surges in popularity
JS is not a performance based language when it comes to CPU focused problems. JS is a single threaded language that relies on async event loop making it great for IO intensive tasks, but due to being single threaded there is a ceiling where multi-threaded implementations can “solve” problems faster. Don’t get me wrong JS is still fast, but due to its architecture it has its limits.
Python isn’t known for being fast either, how-ever, it is more flexible in its architecture to handle specific use-cases like multi-threaded environments, which might or might not be a critical pain point, but could be for data science use-cases.
Finally, if your goal is to get into data science, Python is the name of the game. You can learn using JS, but its second fiddle to Python in the data science realm, and I don’t see that changing any time soon.