# Collect(a) vs. \[a;\]

**URL:** <https://discourse.julialang.org/t/collect-a-vs-a/47055>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [September 22, 2020, 9:09am UTC](https://discourse.julialang.org/t/collect-a-vs-a/47055 "2020-09-22T09:09:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [September 22, 2020, 9:22am UTC](https://discourse.julialang.org/t/collect-a-vs-a/47055/2 "2020-09-22T09:22:35Z")

</div>

I start with the easy one:

> [@remi-garcia](#):
>
> Or maybe I just misunderstood `===` .

Yes I think so, e.g.:

```julia
julia> [5,6,7]==[5,6,7]
true

julia> [5,6,7]===[5,6,7]
false

help?> ===
search: === == !==

  ===(x,y) -> Bool
  ≡(x,y) -> Bool

  Determine whether x and y are identical, in the sense that no program could distinguish them. First the types of x and y are compared. If those are identical, mutable
  objects are compared by address in memory and immutable objects (such as numbers) are compared by contents at the bit level. This function is sometimes called "egal". It
  always returns a Bool value.

julia> ismutable([5,6,7])
true

```

Array are mutable objects and are therefore compared by address in memory. Thats why above `===` comparison gives false.

---

_[View the full topic](https://discourse.julialang.org/t/collect-a-vs-a/47055)._
