1
00:00:00,530 --> 00:00:06,230
So both objects and arrays use memory reference, so that's why they can be written as const because

2
00:00:06,230 --> 00:00:07,890
they are referencing data.

3
00:00:08,120 --> 00:00:13,070
So there is a difference when we're declaring variables and we're trying to update the values of those

4
00:00:13,070 --> 00:00:16,130
variables, then we throw an error when we use const.

5
00:00:16,130 --> 00:00:19,450
But whereas objects and arrays, we don't throw that error.

6
00:00:19,460 --> 00:00:22,370
And as we've seen, we've been using const for the objects.

7
00:00:22,610 --> 00:00:27,510
So they're accessed from a memory and they're referencing the value within the memory.

8
00:00:27,800 --> 00:00:33,890
So that means that that's why we can use it as const as an example of an array and an object literal

9
00:00:34,070 --> 00:00:37,310
where we're setting up the object and we can see all of those values.

10
00:00:37,310 --> 00:00:40,070
And we also saw that we can change those values.

11
00:00:40,430 --> 00:00:44,930
And const also means that it can't change, that it doesn't change.

12
00:00:45,110 --> 00:00:50,940
So you can change the values but not assign the object of value, not redeclared their value.

13
00:00:50,970 --> 00:00:54,860
If you try to reassign it, then you're going to throw an error with const.

14
00:00:54,860 --> 00:01:01,770
And at that point you do need to use let because array can no longer equal this if you're changing.

15
00:01:02,330 --> 00:01:03,560
So just keep that in mind.

16
00:01:03,560 --> 00:01:09,140
And that's why we are using CONSED and there's also let if you are looking to reassign it.
