The “Talk”: Where do string methods come from?

Let’s talk data

In JavaScript, there are seven “primitive” data types…

Inventing our own data type

To show how this works, we’re going to pretend to invent a brand new data type. I like football, so let’s make a fake FootballPlayer data type and define it using a function

Piecing things together

The reason we walked through the above example is to demonstrate the following. This code below…