Hi welcome to Unit 11 which is all about javascript arrays so arrays are going to be our first data
structure and data structures are just ways of storing data ways of holding information using javascript
.
So we've seen variables so far which will let us hold one piece of information like a name a phone number
a number.
But what if we wanted to have all of the names of all of our friends.
Hopefully it's not just one but we have multiple friends and we want to be able to store all of them
together.
A variable is not really going to work for that.
So the array is one of javascript's answers to that problem.
So arrays are really really useful in all sorts of real world and practical situations.
So a site like Facebook or Yelp they're going to have arrays all over the place any time that you imagine
or you think of a list of data.
So there's groups of data that are related.
So let's take an example of it make a Facebook post and that Facebook post hopefully if it's a popular
one let's say I'm getting married or I made a funny joke one time or someone close to me died and I
get a bunch of sympathy comments.
Whatever it is if I get a bunch of comments there's a list there.
And Facebook stores them together it keeps track of them together using an array.
We're going to use arrays to do things like keep track of that to do that you have in your To Do list
or to keep track of the comments on a particular post or to keep track of the photos that correspond
to a particular user.
So they're really really useful.
It's not just some construct something that you're learning early on but it's really something that
we'll use throughout the rest of the course and I say that a lot and it's because everything I'm showing
you is the stuff that you need for the rest of the course.
So not just saying that a promise.
OK let's get started with the race so we have three main objectives again.
The first one is that I want you to be able to define race not explain what they are not that kind of
define.
But actually you use code to define an array and then remove and add elements from that array.
The second objective is that you should be able to use builtin Array methods to add and remove and manipulate
the array.
So there are things like push and pop shift and an shift that we'll talk about.
These are all built in methods that you should be able to use by the end of the unit.
And then the last thing that we'll do is we'll build a simple project to do list application using a
race.
So will use functions we use arrays will these variables conditional logic.
It's not going to be a fully functional crazy to do list with a visual interface just yet we will be
working towards a really nice looking visual to do list.
It's responsive and it looks really nice.
For now this is going to be based in the javascript console.
So I do want to set your expectations.
We will be revisiting the To-Do list though and it will still use the race and functions and variables
and everything else.
All right so let's go ahead and get started.