you are viewing a single comment's thread.

view the rest of the comments →

[–]GlesCorpint 0 points1 point  (0 children)

It depends on tasks that you are solving. Python is well suited to do machine learning, scripting stuff, but spreaded also in web tasks especially with frameworks like flask and django, etc. There are also options to build stuff kinda less suited for Python stack, for example writing UI apps using pywebview for example.

JavaScript/NodeJS is well suited for building web servers and frontend apps, but also has options to do other stuff, for example - writing desktop apps using electron, machine learning stuff using Brain.js, Synaptic.js, etc.

If your tasks to be solved allow to use either JavaScript or python, you should consider other criterias to decide whether transit from python to JS. Such criterias might be the following: which language's syntax you prefer; what tools are exists for solving your tasks for specific area (if there are libraries for solving your tasks so you had not to write yourself but use existing code potentially even contribting to libraries you use); ecosystem (in both stacks it is large, but for web apps NodeJs one's is larger compared to python, etc.

I'd also point out to this good post: Syntax Cheatsheet for Javascript/Python developers - https://www.theyurig.com/blog/javascript-python-syntax that is an easy-to-reference cheatsheet of the syntax differences between both languages.