re: Python VS Javascript VIEW POST

FULL DISCUSSION
 

Python has mutable and immutable data types like set (mutable) and list (immutable).
Both set and list are mutable in Python afaik. Tuples aren't.

Javascript has no concept of mutable and immutable.
That is not quite true. Conceptually, immutability exists in js as it does in most languages I believe.
Some methods are mutative while others aren't (push vs concat for instance).
You can also use Object.freeze to prevent an object from being mutated.

Javascript has no built-in hash table support.
JavaScript has objects which can pretty much be used the same way as maps, but it also has the Map and Set built-in.

 

Thank you for your comment and correcting me!

code of conduct - report abuse