 So let's modify the arrays we can create them now by just adding values or strings We can generate them by either filling them running a little for loop There's all sorts of ways to to Generate an array, but let's see once they exist. How can we change to them? We're gonna look through a few functions built-in Julia functions that will change them They come in two varieties Basically one with and one without the exclamation mark that exclamation mark is usually referred to as a bang and when you add a bang It makes the changes that that function Makes to the ray it makes a permanent. So let's just create an array. We're gonna use the collect function Through this unit range. I'm not putting a step in so the default steps gonna be used Which is one so we're just gonna jump one integer at a time. We've got a five element column array of 64-bit integers now, let's add a value to the end and There we can use this push exclamation mark or push bang the arguments that it takes is the ray that you want to To act on and the value that you want to add So let's add that and lo and behold. We have a six. It's permanent that mod underscore ray is now permanently changed What if I want to add an element at the start of the array? Well, there is the unshift Function and we're gonna add a zero day and lo and behold. We have zero one two three four five six What if I want to remove the last element? okay, let's use pop and Mod array and it removes the last value which was a six and it returns that value Let's call mod array again, and you can see it is just be zero to five Whatever I wanted to remove that first element now. We're gonna use this shift function So shift is going to remove the first element unshift will add a first element So it's a bit confusing. There you go. It returns what it will remove for unmoderate or moderate again I says one two three four five. Let's create a new one called mod underscore ray And we just passed the values 11 12 13 14 and 15 because I want to show you What if we wanted not to add or delete something at the start or the end but some way in the middle? So let's choose an index. So I'm gonna say delete at Moderate comma three so this delete at with a bank. So it's a permanent change on the moderate function Please remove index value at index number three Julia starts counting from number one. So 11 12 13 13 is going to be removed and It returns for me the full sometimes some of these functions return the full array Sometimes it returns what it removes. You just have to watch out So delete at it's going to return for me the new array So what if I wanted to add Or to put the value 13 back at position 3 Now it's not as simple as that. What is at position number 3 now if we were to call moderate now We're gonna get 11 12 13 14. What is in position number 3? Well, it's the 14 and in that Place there. I want to put a 13. So if I run this, what do I get? I get 14 back That might be a bit confusing, but what it is returning the splice function Is the value that it is removing to make place for the 13? So it's this 14 that is going to be checked out because if I call moderate again, it's now 11 12 13 15 Now what if I want that 14 back? I didn't necessarily want it to placed Well, then I have to pass more than one value. So replacing the value in position 4. What is position 4? It's 11 12 13. It's the 15 So go to splice the moderate position 4 and add to it this unit range 14 to 15 with an increment of 1 and if I do that is this going to say 15 that is what was removed it was spliced there and the 15 was removed because if I call moderate now It's going to be 11 12 13 14 15 So you've got to be very careful when you want to try when you want to add things in The middle of an array or at least not at the start or the end Now let's sort arrays. Sometimes that's very necessary thing to do. So let's create a 10-element array I'm going to use the ran function in this unit range 10 to 20 inclusive and I want 10 Elements back so between the values of 10 and 20 inclusive, please give me 10 values at CEDA random So there's a 10 element array all of them 64 bit integers in the first dimension That means a one column. I can ask for it to be sorted. So I'm just going to use sort and just a string array I'm not passing any other arguments and that is just going to go in a sending order So 12 12 14 15 all the way up to the 20 20, but I did not use a bang. I just said sort So if I call string array again, nothing has changed. It is still in the order that it was before So if I want to make that permanent, I've just got to use the bang version of the sort function And if I now call str underscore array, it is still sorted So that's a few ways just to modify the common ways to modify an array Next up, we're going to just increase the Dimensions or we're just going to have more than one column or more than one row. We're going to talk about matrices