What come back in this lesson here, are we going to learn how we can use the cards to reach in our
brother and.
Like I said, there has we have seen with you in the previous video, if you tried, for example, to
click on it, it ends up dead.
For example, your price click update.
The updates is done successfully, but once you try to reload your page, you're going to see you are
going to get the default deal that you had before.
So the desire is to save all our data storage.
That means you are going to keep this data in your browser.
Even if you reload your page, you're going to have the same, OK?
You are going to really have the update that you have then updated.
The reason why we are going to use the local storage ANES by using the local storage, even if you delate
OK, because it is small means if I tried to delete and reload speeds, I'm going to get the default
values that I had before.
So the first thing we're going to do here is to remove all things, all data that we have in our array
and we are going to leave our eRate empty like this.
And the last idea in this moment is going to be equal to zero because we don't have any elements in
our erry look, and because when we're going to insert for the first time, we are going to call this
function, which is Ebtekar Endler, and the idea is going to be equal to this DOT state, that last
idea, which is zero for the first element that's we're going to save and we're going to age one.
That's me.
The idea is going to be equal to one and reason why.
Make sure to put your last equal to zero because our error rate is empty.
OK, and the second thing we're going to do is try a case or.
Very good and to go back first Oring brother and let us test to see what's going have like reaction.
OK, and we are going to save Toyota.
We're going to choose the color of black.
We cannot set the price.
And thus we're going to click on VALIDATE.
We have a value.
But also you load this page, you're going to see we have lost the value that we had before.
OK, we have lost this value.
And if I tried to insert again, click on it.
OK, so is yes, there there is gone is the will is going to we have what we have by default, which
is an empty every.
So the thing we're going to do here is to call these debts to the local authorities, to call the local
authorities in order to keep all data in different insights and different sides in order to keep our
data like it, too.
Don't lose data once we load the speech.
Let us come here, own Ed and OK, we're going to come to AIDS currently.
OK, that's after updating your data, which is in your state.
And here we are going to say local storage.
We cannot call the local storage and rigourously set item and we are going to create a statewide it
is like is a police station and get session in.
OK, you have to keep it in your and we are going to say this is a citizen organisation stated that
in the title, we're going to say you're going to be new cars like these new cars and hearing reports,
comma.
And we're going to say, Jason, that spring is like, OK, and it's not here.
We are going to take strength and.
Like this, we are going to take the class test does we have union cars and we're going to put in our
strength a perimeter and what we're going to do, we are going to get now this new car.
So let us right.
It's like this in small case, like no camel kids.
Let us copy and we're going to copy this item.
We are going to get this little item where in our mycorrhiza data, which is our states, that's mean
even if you reload your page, you can't lose the data that you have updated.
And here we're trying to say we are going to court or with this local castrates, we're going to ask
a question for the first time, OK, do we have something in our local storage?
OK, do have something in our local storage, which is the new cars, because we have set a new course.
OK, and now we're going to ask this question, OK?
We're going to say questionmark is a turnour local story.
Do we have something to new cars?
Do we have something to get?
Do we have some items to get in our local storage, which is new cars?
If yes.
I'm going to say a diesel.
OK, like this.
Yes, I'm going to say if yes, I'm going to say Jason, OK, pass inside here and what we're going
to say, I'm going to say, look, our story that gets 810 and get this item, OK?
And this item is Newkirk's OK.
This item is Nukaga.
Just not like this.
Otherwise, if nothing, you're going to say it's a rain.
Our eRate is going to be empty like this.
OK, then if it's true because you're away because they're just ate a new value, which is Toyota,
the color, which is the rates.
The price which is forty thousand dollars.
Let us click on that.
It we have it.
And if you try to reload your speech, you're going to see you're going to get the same data here.
You can't lose your.
And let us reload.
Click here.
Very good.
You can see that we have the same data.
OK, yes.
And if I try to add another value, because we're going to a detects in your case, something which
is not good.
Notice when you try to reload your speech, OK, you will see your left side is going to be set to zero
because you reload your page.
And we have only met the local storage for Michael's array, but not for last IJI, because every time
we insert a new information into our table, each table is inside.
And the idea depends on last night that we have here, because if you try to come here and do a function,
we have the idea.
And the idea is this, that status like ID plus wine for the first time if you want to insert the first
value.