JavaScript Syntax Soup: 「‹obj›.‹property›」 vs 「‹obj›.prototype」


Another episode of syntax soup.

JavaScript Syntax Soup: 「p in o」

In JavaScript, you have these syntex:

The first looks the same as part of the second, but have completely different semantics. 〔☛ JavaScript: Property, Prototype Chain, Enumerable: Accessing & Listing Properties

JavaScript Syntax Soup: 「‹obj›.‹property›」 vs 「‹obj›.prototype」

A syntax to access JavaScript object's properties has the form obj.propertyName. 〔☛ JavaScript: Dot Notation vs Bracket Notation for Accessing Properties

JavaScript object also has a “attribute” called “prototype”, which, is not a property, but the syntax to acces it is also obj.prototype. 〔☛ JavaScript Tutorial: Understanding Prototype & Inheritance

Soup. Soup. It's All good Soup.

blog comments powered by Disqus