Open dev-experience opened 3 years ago
**Features of JavaScript
It's a cross-platform language
It's widely used for client-side and server-side
Strong Testing Workflow
It's easy to learn and to start coding with
Offers added dependencies
Features of Python
Here, are important features of Python
Features of Python
Easy to learn, read, and maintain
It can run on various hardware platforms & using the same interface.
You can include low-level modules to the Python interpreter.
Python offers an ideal structure and support for large programs.
Python offers support for automatic garbage collection.
It supports an interactive mode of testing and debugging.
It offers high-level dynamic data types and also supports dynamic type checking.
Python language can be integrated with Java, C, and C++ programming code
Easy concurrency support via goroutines
Fast compilation times
Statically linked binaries which are simple to deploy
Key differences
Python:
has to be installed
runs in a development environment [IDE] only
Python has mutable and immutable data types.
source code is ASCII
different types of numeric types like int, float, fixed-point decimal and so on....
Has built-in has tables called dictionaries, sets used in hashing with keys and values.
Uses class based inheritance
Use indentation
Will throw if function is called without an incorrect parameter and accepts some additional parameters passing syntax
Javascript:
No installation required
Runs both in IDE and browser.
Js does not have the concept of mutable and immutable.
Source code should be encoded as UTF-16 and no built-in support for manipulating raw bytes
Has only floating point numbers
Has no built-in has table support
Uses prototype based inheritance. Classes are just syntactical sugar.
Uses curly brackets
JS doesn't care
Some code example
_element = np.arange(15)
for int in element :
print(int , end = ' ')_
_const print_numbers = () => {
let element = 15;
for(let int = 0; int < element; int++){ console.log( int )}_
}
@raybags-web-dev please reformat the code snippets with proper Markdown.
Looks like you created the 1.1.5
task and I created the same task for you at the same time. So, thanks for looking into both of them 👍
@raybags-web-dev
I would like to disagree with the following points:
Python
python my-script.py
or in interactive mode (like browser console)JavaScript
Object.freeze()
method that can make your object immutable (MDN: Object.freeze())BigInt
was introduced (MDN: BigInt)JS doesn't care
😂
You can master it.
You should keep in mind that there are two different JavaScripts: browser-based JavaScript and server-based JavaScript.
Languages are quite similar but server-side JavaScript has more features and runtimes are different. Server-side JavaScript runs on Node.js.
You have a typo in both mentions of a "hash table".
BTW, please check out what a hash table
is. It's quite important data structure. But don't dig very deep into this topic, you can always revisit it later.
Definitely. I'll check it out. If I wasn't so deep and invested in JS, I think python is a pretty interesting language as well.
Review & Self-Study
Study a bit on the different languages available to the programmer. Try to write a line in one language, and then redo it in two others. What do you learn?