Both these languages seem extremely similar to me. Although Python supports actual classes instead of being prototype-based, in Python classes are not all that different from f
I'll add a few I haven't seen mentioned yet:
JavaScript objects/arrays support that cool feature where you don't need to quote (single-word) strings when creating new objects:
var foo = { bar: "baz" };
Accessing associative array keys in JavaScript can be done using dot notation, in addition to brace notation. That is, these are the same:
foo.bar; //returns "baz"
foo["bar"]; // returns "baz"
Python's anonymous function (lambda
) syntax is not as flexible as JavaScript's anonymous functions.