- Loose Typing. It has benefits, much greater expressive power, often programs tend to be easier to write.
- Objects as general containers. Brilliant idea, unification of objects and hash tables, objects are completely dynamic things in which new members and new methods could be added at any time.
- Objects can be augmented. You can take an existing object and add new stuff to it at any time — new members, new methods. And we do it simply be assignment. We don’t need to make a new class (in fact there are no classes).
- Prototypal inheritance. Really distinct from classical inheritance, objects inherit directly from other objects, there are no classes, powerful idea, not commonly understood very well.
- Inner functions. Functions do not have to be defined at the top level. Functions can be defined inside of other functions. That turns out to be a really useful thing.
- Static Scoping or Lexical Scoping. An inner function has access to the variables and parameters of functions that it is contained within.
- Implied global variables. Any var which is not properly declared is assumed to be global by default.
- Only functions have scope, blocks do not have scope. This causes people to think incorrectly about variable scope. If you declare a variable any place inside of a function, it’s visible everywhere in that function.
- When a function is called in the function form, [this] is set to the global object. That is not very useful. It makes harder to write helper functions within a method because the helper function does not get access tho the outer [this]. var that = this.
- Confusing implementation of prototypal inheritance, the language itself is confused about its prototypal nature.
- typeof array = object, which isn’t wrong, but it’s not very helpful.