Welcome to the first of many pages for this pirate radio station that doesn't have a single mp3 in its library!
Click on the buttons below to change the colors of the font. It's madness!!
Because we already know it's hot outside.Tweets by LauraThomasTV
Wants some tunes? Pay up!! My rate has changed to $30 an hour.
What is slice? Slice, from Array.prototypce.slice(), is a method that returns a copy of a portion of an array into a brand new array object selected from begin to end. THe cool thing about this is that the orignal array isn't modified. It's great for taking parts of an array and putting them into something new.
It's like going to the grocery store. Think of the store as a giant array. Your shopping list contains the requried items. We can add to or remove, so it's a variable. Let's say we want everything from this store, but bananas. We would do the following
var store = ['Banana', 'Chicken', 'Cheese', 'Milk', 'Almonds']; var list = store.slice(1); console.log(list)
[ 'Chicken', 'Cheese', 'Milk', 'Almonds' ]
See how useful that could be. Sometimes when we access data, we just want a small snippet of it, not a huge chunk! Check out more at the MDN for Slice!
Click the button to get your coordinates so Batman can find you.