I recently learned JavaScript an all of the sudden I hear about Python...
Should I go learn Python or just stick with my basic JavaScript knowledge?
If you have some "facts" I would love to hear them! Like efficiency, difficultylevel and so on, an so on...
Thanks :)
Python's "object-based" subset is roughly equivalent to JavaScript. Like JavaScript (and unlike Java), Python supports a programming style that uses simple functions and variables without engaging in class definitions. However, for JavaScript, that's all there is.
The difference between Python and JavaScript languages is minimal. You can do almost everything with both Python and JavaScript languages as they share common things like lexically scoped, object-oriented, interpreted, functional and imperative programming.
While Python can be used to develop the back-end part of a web application, JavaScript can be used to develop both the back-end and the front-end of the application. The front-end is the part of the application that the user sees and interacts with.
The answer: JavaScript is more difficult to master than Python. Python is usually the beginners-choice, especially for those who do not have any prior programming experience. Python code is notorious for being more readable, meaning that it is easier to understand (and write).
The two are generally used quite differently. Javascript is primarily used as a client side scripting language vs python which is a server based language. So in a website you could use both. But not sure if this is what you were wondering.
If you're just learning a language, then there is none better than Python. It's an easy language to pick up. It's well documented. It's associated with a large, active, and friendly community. Since it's a scripting language, you can easily try stuff out and immediately see the results. You can also build up from programming basics, starting by learning functions and then moving into classes.
Javascript is the bane of many a programmer's existences. It's easy enough to learn, and is good for small scripts which is what is was designed for. But once you start making anything big, it becomes hard to keep track of. That's why language modifications like CoffeeScript, Typescript and Dart have emerged.
As noted by spinon, these programming languages were used in very different ways. Python is a general scripting language, which can sometimes be used to do server-side work. Javascript used to be solely used for building interactivity on web pages. Nowadays, however, it also becomes popular in server-side and desktop applications as Node.js.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With