Question: When I open my page, messages output from in to out like a bubble event. Message 2, Message 1. But I need output Message 1, Message 2 like a tunnel event. Why did it happen so?

```
<div by-global-size="width:100%;height:5%;">
<div by-parent-size="width:50%;height:30%;">
</div>
</div>

.directive("byGlobalSize", function () {
    return {
        link: function (scope, element, attributes) {
            alert("Message 1");
        },
        restrict: "A",
        scope: true
    }
})
.directive("byParentSize", function () {
    return {
        link: function (scope, element, attributes) {
           alert("Message 2");
        },
        restrict: "A",
        scope:true
    }
});

```

I will not have two directives, this is just an example.

```
<div by-global-size="width:100%;height:5%;">
<div by-parent-size="width:50%;height:30%;">
<div by-parentChild-size="width:100%;height:5%;">
<div by-parentChildLittle-size="width:50%;height:30%;">
</div>
</div>
</div>
</div>

```

One more HTML example. From parent to child, I need build dom tree.

Answer: 
*array* - a contiguous series of elements that actually exists in memory. It *has an address*, usually considered as the address of the first element of the array.

*pointer* - a variable that *contains an address*. The address contained in a pointer may or may not point to actual memory.

Think of it this way - your home *has an address*. It exists *somewhere*, and you can put stuff in it - it's an *array*. You can put any address on an envelope and try to mail it. It may or may not get properly delivered for a lot of reasons - the street address written on an envelope is a *pointer*. And you can't store anything in that writing.
Strictly answering the question in the title - **arrays are not pointers:**

---

* `int arr[10]`:

	+ Amount of memory used is `sizeof(int)*10` bytes
	+ The values of `arr` and `&arr` are necessarily identical
	+ `arr` points to a valid memory address, but cannot be set to point to any other memory address (i.e., it serves as a constant "label")

---

* `int* ptr = malloc(sizeof(int)*10)`:

	+ Amount of memory used is `sizeof(int*) + sizeof(int)*10` bytes
	+ The values of `ptr` and `&ptr` are not necessarily identical (in fact, they are mostly different)
	+ `ptr` can be set to point to both valid and invalid memory addresses (i.e., you can change it during runtime as many times as you will)