The uncanny similarities between modern JavaScript and Python.

If you are a Python programmer and dabbled with JavaScript in the past, you might be a bit schocked on how much JavaScript has evolved. And in a good way.

I will present the argument by simply showing comparative code snippets. You make your judgement. I am basing this mostly on modern ECMAScript 6. For an helicopter view of the new features of JavaScript ES6 check this awesome site.

And, by the way, semi-colons are optional in JavaScript

Destructuring

print('Hello')
console.log('Hello')

Iterators

print('Hello')
console.log('Hello')

for of

print('Hello')
console.log('Hello')

Generators

print('Hello')
console.log('Hello')

Dictionaries and Sets

print('Hello')
console.log('Hello')

Typed arrays

print('Hello')
console.log('Hello')
array find string searching multi-line strings string %f (p 3.6) binary octal modules classes (think this) getter/setter javascript symbols? default parameters kwargs scoping lambdas semicolons!

Typing