 As I briefly mentioned, what Pigeon calls dictionaries, JavaScript calls objects. Objects in JavaScript are not created with an operator per se, but instead created with a literal syntax. An object literal is denoted by a pair of curly braces in which you list the key value pairs, though JavaScript actually calls the key value pairs properties. Unlike Pigeon dictionaries, the keys of a JavaScript object can only be strings, not numbers or any other kind of value. To access and modify the properties of an object, we use an operator which is a pair of square brackets. The brackets immediately follow some expression which evaluates into an object, and inside the square brackets we put a string expression which is the name of a property, that is some key. So in this code, the first thing we're doing is assigning to foo a new empty object, an object with no properties. In the second line, we're assigning to bar an object with two properties. The properties are separated by a comma, and each property is written as first the string key, then a colon, then the value. So the first property here is the key bill with the value two, and the second property is the key Diana with the value true. In the third line, we're assigning to act the value of bar's property named bill, which as we just said currently has the value two. In the fourth line, we're assigning to bar's property bill the value three. Recall that when we discuss the assignment operator, we said that a simple variable is not the only kind of L value, the only kind of valid target for an assignment. Well, here's the other kind, an assignment to an object property. In the next line, we're assigning to foo's property Ned the value eight. Note though that foo until this point didn't have any properties, so this assignment actually creates a new property in foo named Ned. In the last line, we're assigning the value foo's property Ted to act, but because foo has no such property at this time, the expression returns the value undefined. JavaScript provides two syntactical shortcuts for properties. First, in our object literals, property names which conform to the rules of identifiers can be written without enclosing quote marks. Second, instead of using the square bracket operator, property names which conform to the rules of identifiers can be written with the dot operator and again no enclosing quote marks. Because bill, Diana, Ned, and Ted are all strings which conform to the rules of identifiers, we can write the same code like so. Not only is this cleaner to look at, it's easier to type. Of course, you'll have to fall back on the verbose notation for property names which don't conform to the rules of identifiers. Also, understand that the expression inside the square brackets doesn't have to be a string literal, it can be any expression which returns a string value. Here, for example, we're specifying a property by the string returned from the call to Alice. For such uses, we can't use the dot operator. The dot operator only works when we want to specify the property name directly. The term method is basically a synonym for function, but it's used in the context of object-oriented programming to mean a function which is defined as an operation for some data type. We'll discuss the theory of object-oriented programming later. For now, suffice it to say that in JavaScript, the term method refers to a function which uses the reserved word this. The reserved word this is essentially a special kind of parameter, a parameter which gets its argument in a peculiar way. To illustrate, here we assign an empty object to foo and then assign a function to the property bar of foo. This function assigns a value 3 to the property ack of the special parameter this. So how does this get its argument? Well, when the function property is accessed via the dot operator or square brackets and then called, JavaScript passes the object to this. So when we invoke foo.bar, foo is passed to this, and so in the last line here, foo.ack has the value 3. You might be wondering what gets passed to the special parameter this when we invoke the function without accessing it as an object property. Here we have the same setup, but instead of invoking the function via foo.bar, we assign foo.bar to a variable Greg, then invoke Greg. Without the property access syntax, there's no object specified to pass to the special parameter this. What JavaScript does then is pass the default global object, which is an object that represents the global namespace itself. Any global variable we assign is actually a property of this global object, and vice versa, any properties we assign to this object show up as global variables. So because the call to Greg assigns 3 to the property ack of the global object, we then have a global variable ack with the value 3. Now this behavior just described with methods and the global object really isn't useful at all. I suppose it was decided that passing the global object to the special parameter is better than passing undefined. In practice though, methods should really just always be called as object properties such that some specified object gets passed to this instead of the global object. The next question now is how are methods useful at all? Well, to be honest, it's really just a syntactical convenience. We could get the same exact effect with a regular parameter. Here for example, instead of using the special parameter this, we just give the function a regular parameter x to which we'll pass the same object. So in the call to foo.bar, we pass foo as the argument. Admittedly, this is a bit more verbose, but it achieves the exact same effect. However, for reasons that will become clear when we discuss object-oriented programming, it was decided that invoking a function as an object property and passing the object as argument is something we want to do commonly enough that it deserves a less verbose syntax. The last thing we'll note about the special parameter this here is that unlike regular parameters, it can't be assigned values. Here the assignment of 3 to this will trigger an error.