correct the term spread operator to rest operator + reduce the space between . and If
This commit is contained in:
parent
56ebfc0f7d
commit
5b5687862a
|
@ -1,6 +1,6 @@
|
||||||
// we have 2 solutions here, an easier one and a more advanced one.
|
// we have 2 solutions here, an easier one and a more advanced one.
|
||||||
// The easiest way to get an array of all of the arguments that are passed to a function
|
// The easiest way to get an array of all of the arguments that are passed to a function
|
||||||
// is using the spread operator. If this is unfamiliar to you look it up!
|
// is using the rest operator. If this is unfamiliar to you look it up!
|
||||||
const removeFromArray = function (...args) {
|
const removeFromArray = function (...args) {
|
||||||
// the very first item in our list of arguments is the array, we pull it out with args[0]
|
// the very first item in our list of arguments is the array, we pull it out with args[0]
|
||||||
const array = args[0];
|
const array = args[0];
|
||||||
|
|
Loading…
Reference in New Issue