So like PHP and Python and the other languages that we've been familiar with, Javascript has Linear Arrays and associative structures but the associative arrays are actually objects and so we'll kind of talk about them in more detail in the next major lecture where we talk about Object- Oriented Programming. It's kind of interesting that in Javascript, you have to learn about Object-Oriented earlier than other languages, another reason why I'm not a fan of Javascript as first language. But it turns out that Javascript objects are super powerful and flexible and gorgeous and so we'll get to them. So, a Linear Array is quite straightforward. You say [ ] and then you have commas and that's an array. Now, the interesting thing is if you read about JSON, you might have actually seen the Javascript notation for arrays and objects already because JSON is exactly the same notation and it's similar to Python as well. This is a Linear Array, that's 0, 1, 2, 3, 4, and then you can have key values things, but these are objects, not arrays and we'll get to that. You can say a[0] which will get you the zeroth thing, "x" and b['name']. This is the part that kind of confuses people because that basically says, go into the object b and look up the attribute "name". But that's in quotes and it just is a little bit strange but you can kind of pretend that objects are associative arrays and you can even make them just like you made an object that has no quote in it but it just has data in it as a set of key value pairs. People coming from languages like PHP that expect associative arrays to have key value capabilities, they just kind of make objects and don't worry too much about it. We'll get the objects in greater detail later. You can also kind of construct arrays through various ways, you can make a sort of fresh empty array and then push things onto the end of it so you can have this array and you keep adding to the end of these things. Push, push, push, and so we end up with "first" and "second", or you can say array [0] equals "first" and array [1] one equals "second" and then you end up with an array that looks like that. So, that's another way of kind of building an array up from little pieces. You can also use the constructor style where you just put the list of things that you want in the array. This little bracket syntax is sort of a shorthand for the constructor style of making a, in this case, two element array. Control structures, again, since you're coming from PHP, we're not going to go over everything that's the same as PHP because operator is the same as PHP. "if" statements are like PHP, while loops are like PHP, for loops are like the PHP counted loops. All right? We'll talk about that, and break and continue work a lot like PHP. That's part of the reason that I like teaching PHP first because they're both C-like languages and then I can go on and just say, hey, remember all this stuff we've done in PHP? There is a difference between the definite loops and PHP use 'foreach' but in Javascript, we use 'for'. In this case, we're going to say for ball in balls, which is kind of a little Python-like actually, this is the iteration variable and this is the collection. This is an object but don't worry about it, we'll just pretend it's a key value array for now. This basically says is that ball, the iteration variable is going to go through the successive keys in here and then we can just say balls[ball] to look up these values, the corresponding values as you go through. It doesn't have a Python-like to iteration variable thing. This will loop through and go through and hit them all. Up next, we're going to talk about playing with the Document Object Model in Javascript.