Let us continue and trigonal and let us begin our visas to your cards and let us come in our function,
which is it cuts in function at this and let us come here.
The first thing to do, we are going to define a couple things, not let us confess or let us come,
first of all, in our states and create a model data.
We're going to court is the tarka.
Cut items like these cuts items, and it will be in Iraq.
OK, so let us take it as Crothall.
We are going to define a A constants, a constants in which we are going to assign our records in order
to respect the immutability condition because we are going through a multitude, are a copy and offer
that we are going to update our record items states, OK, our ID card team card items, data breaches
in our states.
So let us see what I'm going to do.
The first thing, I'm going to create a new contest and I'm going to name this Konstanz card items and
cart items is going to be equal to this that states this, that the states that cart items and I going
to say is equal to slice and I'm going to copy, I think that I have in my cart items.
And after that, certain words I'm going to do and I'm going to declare it variable.
That's ambulant name late already.
Ein carped like this lady thought, I'm going to finish, I'm going to initialize this in force.
OK, so let us scroll down and the first thing I'm going to do, I'm going to say if.
I don't have something if nothing is in cards.
OK, and I'm going to call already.
Yes, if nothing is incorrect, then you are going to put something in court in small means, you can
see cut items is empty because that is empty because our estates are cut items.
That's how it is in our our state is also empty.
And we are going to take all properties that we have here in our cart items like our cart items.
So it is in our estate is an array and the items constants will be also be a and if we have something
here and we are going to copy all things that we have here and we are going to assign these items,
OK, and if we want to add in other things, we are going to mutate card items constants instead of
everything to mutate directly our estate.
And yes, we are going to take the card items contents and we are going to assign it by using the we
are going to assign it to our items by using the sets that function in order to avoid the immutability
and immutably in order to to respect the immutability condition in which case.
So here we are going to say because by default it is false, false.
And if we say like this does mean it is true that the condition is going to be verified.
OK, and if nothing is in cards, if we reserve like this, that means if nothing is in cards.
OK, because here we have a card.
And if we read this, we put this exclamation mark, we are going to say if nothing is in cards.
So what you want to you are going to take in your will to take these events.
OK, because by clicking on the bottom, we are going to get the specific objects in which we can take
all properties of the elements of the vector.
And we are going to take this and we are going to take these objects.
And if nothing is in cards, then put it put it in our card.
So what's Recknagel?
You're going to call our Konstanz card items that we can say push.
And you know, the push function is in order to ID something in your array.
And here we are going to say we're going to be using disparate elements.
These parades put they call that means we're going to copy all things that we have in our room.
They call and then we are going to create a new a new sales in our rate that we counts in order to have
the number of the numbers.
Time that we have clicked on the send button and counts for the first time is going to be equal to one.
OK, very good.
And let us back here to try to see what's ahead, like your reaction.
So let us make a consult log and or a console like we are going through puts our cards.
Items like this can items and you're going to display our items in our console, so let us right click
click on Inspect, you're going to inspect, click on console if I try to click here.
OK, so let us open to see what we're going to have.
Like here is country image Nissan.
The point is, listen, I can't and we have all that means we have one thing in our Ricard's one product.
And if I click here and there, I go back here in this moment.
Yes, we have a car, a car to OK, we have car through.
And count is equal to one like this, it is very large for.
The length.
Hendrika sake's like.
And let us suppose that we we we to a we have it needs some work and let us click on it.
And you're going to see it read perfectly.
So the thing we're going to do is to make our visual calls after testing these parts, what's required.
We are going to come here and what we're going to say, we are going to call the city state function.
We're going to say that state state function, OK?
And here we are going to say items like ATMs are items.