That's how it is our estate is going to be equal to the items constants look like it is the same reason
why you can see I have put only carpets in so they don't be amazing.
So like this and we have cardboard items.
Shift is very good.
And let us come first all here, so I'm going to say for for assistant states.
I can't see any items let us go back first for.
Lord.
Click on this.
Sure, there's something.
OK, very good.
So you can see for the first time, we have one element, OK?
And the second time if we click, you're going to see we have two elements.
And if it's to open, you're going to see we have a different index.
The first index is Naison.
The second index is Toyota.
That means we have succeeded through something.
Cards like it is very simple.
Okay, very good.
And if they try to add in order, I have three elements.
Okay.
So let us suppose I want to add the same elements for the second time, OK.
For at least the second time, I can add second time, three times a leghorns, for example.
Let us back here, reload this page for the first.
I have the first elements.
Click here, I have a tree and I want to add the same product.
This thing and some slaters click.
You will see I have two elements in effect.
Like you can see I have the same elements two times, OK, two times letters open and you'll see here
we have image and it is equal to one for these elements and here is equal to true.
But we have the elements in cards, so we must to avoid this problem.
Once you want to add something which is already in our Ricard's, you need only to increase the cards,
which is the quantity.
OK, instead of to add in element in our erase, OK, we must avoid this problem.
So what we're going to do, we're going to back our viewers to your codes.
We are going to solve this problem and what are we going to do?
We are going to come here by using the already cards.
The first thing we're going to do, we are going to access our items to see if the element that we want
to AIDS by using the ID, OK, by using the the ID, namely by using the ID, we are going to access
our items to see if we have any elements with this, with this idea and if the elements already exist.
Are cards in our items here.
We're going to push to add in other elements in our records, but we are going to increase only the
quantity, OK?
And then we are going to keep this condition in order to.
And in order to to do more to save the game, in order to do more, to add some the elements in our
Ricard's, so let us come here, we are going to say we are going to take our items and we are going
to use the foreheads look like this.
And in such here we are going to define a neural function and what we're going to say actis OK.
A we're going to say if.
We're going to say, if I so this does mean access our license compared if the current elements that
we want to it in our records, if it's idee, we can find it in our records.
If it's already exist, if it's already exist, do not push again, OK?
Do not push again here.
And we are going to increase only the accounts of the specific elements.
I thought I'd it ok.
Is it true they call ok.
They cartloads it like this.
The thing we're going to do is to take Cowens OK is going to be equal to plus plus and we are going
to say the already ok we are going to set the already in cart is going to be equal to true.
And when we going to finish with this, we are going to come here and this condition want to be verified
can to be verified and we are going to keep this condition instead of pushing something in our eRate,
we are going to keep this condition because they can't only is increased like I think that it is very
simple.
And here we have a count.
Or is it we have some trouble here or trying to say we're going to say no item.
Yes, very good item that counts.
Plus plus Reynolds.
OK, we're going to have item that counts plus plus like this because item is from our record items.
Okay, so let us go back here in.
Sure.
We have Larry and click on this one.
This is the first elements.
Let us click on.
Yes, we have car three and if we click in the same elements two times, we have only one element.
But the count is equal to two to two for the first time.
You're going to see later.
Scroll down, click here for the first time.
OK, you can see we have is equal to two.
OK, it is updated like the count is equal to two.
So let us reload.
Click on it.
Computer.
The count is equal to two for the first time.
They come in.
OK.
Uh, for a first time is equal to one click here is equal to two, OK, so let us reload.
Click on this song like.
And look, here we have all one elements click on Toyota, we have now two elements.
And if I were to click again on Toyota, we're going to have two elements, but we two quantities.
So let us click your.
We have to.
Very good.
They're going to come here through their records and we're going to continue in the next video.