Skip to content

Commit

Permalink
Fixed stray push statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
iifeoluwa committed Oct 14, 2017
1 parent 5667a94 commit cb94d2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 28 - Spread Operator Introduction.md
Expand Up @@ -32,7 +32,7 @@ What if you wanted to put a veg pizza right in the middle of that? How would do
```js
let pizzas = [];
pizzas = pizzas.concat(featured);
pizzas = push('veg');
pizzas.push('veg');
pizzas = pizzas.concat(specialty);
console.log(pizzas);
```
Expand Down Expand Up @@ -110,4 +110,4 @@ console.log(pizzas);

If we take a look in the console, we can see that `fridayPizzas` lists `'Canadian'` as its first pizza, but our `pizzas` still lists `'Deep Dish'`. We were able to change `fridayPizzas` without being destructive to the initial `pizzas` array.

Again, a spread will take every single item from an iterable and apply it into the new array.
Again, a spread will take every single item from an iterable and apply it into the new array.

0 comments on commit cb94d2b

Please sign in to comment.