Change "rest operator" to say "rest parameter" in challenges and guide (#35496)

* change es6 challenges rest operator to param

* fix rest parameter typos

* change rest operator to parameter in guide

* fix casing

* change rest operator to rest parameter in guide

* change rest operator to rest parameter in curriculum

* remove extra whitespace

* remove whitespaces

* remove whitespace

* fix: removed arabic file

* fix: removed chinese file
This commit is contained in:
Deanna Tran
2019-05-08 10:30:24 -04:00
committed by Jaka Kranjc
parent 4f73b5a7f3
commit 338d7ee8a7
9 changed files with 25 additions and 26 deletions

View File

@@ -1,11 +1,10 @@
---
title: Use Destructuring Assignment with the Rest Operator to Reassign Array Elements
title: Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements
---
## Use Destructuring Assignment with the Rest Operator to Reassign Array Elements
## Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements
Remember that the rest parameter allows for variable numbers of arguments. In this challenge, you have to get rid of the first two elements of an array.
Remember that the rest operator allows for variable numbers of arguments. In this challenge, you have to get rid of the first two elements of an array.
## Hint 1:
## Hint 1:
Assign the first two elements to two random variables.
@@ -39,8 +38,8 @@ function removeFirstTwo(list) {
// change code above this line
return arr;
}
```
```
## Spoiler Alert - Solution Ahead!
You can use random variables to omit the first two values:
@@ -67,7 +66,7 @@ const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
"use strict";
// change code below this line
const [,,...arr] = list; // change this
const [a, b, ...arr] = list;
// change code above this line
return arr;
}

View File

@@ -1,7 +1,7 @@
---
title: Use the Rest Operator with Function Parameters
title: Use the Rest Parameter with Function Parameters
---
## Use the Rest Operator with Function Parameters
## Use the Rest Parameter with Function Parameters
### Rest parameter explanation
[Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters "Mozilla Developer Network")
@@ -13,7 +13,7 @@ title: Use the Rest Operator with Function Parameters
<a href="http://www.youtube.com/watch?feature=player_embedded&v=iLx4ma8ZqvQ
" target="_blank"><img src="http://img.youtube.com/vi/iLx4ma8ZqvQ/0.jpg"
alt="Image of youtube video link spread and rest operator " width="240" height="180" border="10" /></a>
alt="Image of youtube video link spread and rest parameter " width="240" height="180" border="10" /></a>
### Example
This code

View File

@@ -12,7 +12,7 @@ title: Use the Spread Operator to Evaluate Arrays In-Place
### Video Explaining Spread Operator and Rest Parameter
<a href="http://www.youtube.com/watch?feature=player_embedded&v=iLx4ma8ZqvQ
" target="_blank"><img src="http://img.youtube.com/vi/iLx4ma8ZqvQ/0.jpg"
alt="Image of youtube video link spread and rest operator " width="240" height="180" border="10" /></a>
alt="Image of youtube video link spread and rest parameter " width="240" height="180" border="10" /></a>
### Information About apply() Method
[Mozilla Developer Network Apply Method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply "Mozilla Developer Network")