fix(curriculum): Consolidated comments for JavaScript Algorithms and Data Structures challenges - part 1 of 4 (#38258)

* fix: consolidate/remove comments

* fix: remove => from comment

* fix: reverted changes to add same changes to another PR

* fix: removed 'the' from sentence

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix: removed 'the' from the sentence

Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Tom
2020-03-04 13:08:54 -06:00
committed by GitHub
parent 5294936667
commit 17a55c6e18
74 changed files with 123 additions and 237 deletions

View File

@@ -61,13 +61,12 @@ tests:
```js
function filteredArray(arr, elem) {
let newArr = [];
// change code below this line
// Only change code below this line
// change code above this line
// Only change code above this line
return newArr;
}
// change code here to test different cases:
console.log(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3));
```
@@ -83,13 +82,11 @@ console.log(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3));
```js
function filteredArray(arr, elem) {
let newArr = [];
// change code below this line
for (let i = 0; i<arr.length; i++) {
if (arr[i].indexOf(elem) < 0) {
newArr.push(arr[i]);
}
}
// change code above this line
return newArr;
}
```

View File

@@ -72,9 +72,9 @@ tests:
```js
function countOnline(usersObj) {
// change code below this line
// Only change code below this line
// change code above this line
// Only change code above this line
}
```

View File

@@ -58,9 +58,9 @@ let user = {
};
function addFriend(userObj, friend) {
// change code below this line
// Only change code below this line
// change code above this line
// Only change code above this line
}
console.log(addFriend(user, 'Pete'));

View File

@@ -65,9 +65,9 @@ let userActivity = {
}
};
// change code below this line
// Only change code below this line
// change code above this line
// Only change code above this line
console.log(userActivity);
```

View File

@@ -51,9 +51,9 @@ let foods = {
strawberries: 27
};
// change code below this line
// Only change code below this line
// change code above this line
// Only change code above this line
console.log(foods);
```