chore: manual translations (#42811)
This commit is contained in:
committed by
GitHub
parent
a3395269a0
commit
c4fd49e5b7
@ -128,7 +128,7 @@ function checkScope() {
|
||||
let i = 'block scope';
|
||||
console.log('Block scope i is: ', i);
|
||||
}
|
||||
|
||||
|
||||
console.log('Function scope i is: ', i);
|
||||
return i;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ assert(
|
||||
const makeServerRequest = new Promise((resolve, reject) => {
|
||||
// responseFromServer represents a response from a server
|
||||
let responseFromServer;
|
||||
|
||||
|
||||
if(responseFromServer) {
|
||||
// Change this line
|
||||
} else {
|
||||
|
@ -12,7 +12,7 @@ Promises are most useful when you have a process that takes an unknown amount of
|
||||
|
||||
```js
|
||||
myPromise.then(result => {
|
||||
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
@ -63,7 +63,7 @@ const resultIsParameter = /\.then\((function\(result\){|result|\(result\)=>)/.te
|
||||
const makeServerRequest = new Promise((resolve, reject) => {
|
||||
// responseFromServer is set to true to represent a successful response from a server
|
||||
let responseFromServer = true;
|
||||
|
||||
|
||||
if(responseFromServer) {
|
||||
resolve("We got the data");
|
||||
} else {
|
||||
@ -78,7 +78,7 @@ const makeServerRequest = new Promise((resolve, reject) => {
|
||||
const makeServerRequest = new Promise((resolve, reject) => {
|
||||
// responseFromServer is set to true to represent a successful response from a server
|
||||
let responseFromServer = true;
|
||||
|
||||
|
||||
if(responseFromServer) {
|
||||
resolve("We got the data");
|
||||
} else {
|
||||
|
@ -12,7 +12,7 @@ dashedName: handle-a-rejected-promise-with-catch
|
||||
|
||||
```js
|
||||
myPromise.catch(error => {
|
||||
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
@ -63,7 +63,7 @@ const errorIsParameter = /\.catch\((function\(error\){|error|\(error\)=>)/.test(
|
||||
const makeServerRequest = new Promise((resolve, reject) => {
|
||||
// responseFromServer is set to false to represent an unsuccessful response from a server
|
||||
let responseFromServer = false;
|
||||
|
||||
|
||||
if(responseFromServer) {
|
||||
resolve("We got the data");
|
||||
} else {
|
||||
@ -82,7 +82,7 @@ makeServerRequest.then(result => {
|
||||
const makeServerRequest = new Promise((resolve, reject) => {
|
||||
// responseFromServer is set to false to represent an unsuccessful response from a server
|
||||
let responseFromServer = false;
|
||||
|
||||
|
||||
if(responseFromServer) {
|
||||
resolve("We got the data");
|
||||
} else {
|
||||
|
@ -33,7 +33,7 @@ assert(code.match(/import\s+subtract\s+from\s+('|")\.\/math_functions\.js\1/g));
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
|
||||
// Only change code above this line
|
||||
|
||||
subtract(7,4);
|
||||
|
@ -53,7 +53,7 @@ assert(
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
|
||||
|
||||
// Only change code above this line
|
||||
|
||||
uppercaseString("hello");
|
||||
|
@ -86,7 +86,7 @@ const LOCAL_FORECAST = {
|
||||
};
|
||||
|
||||
// Only change code below this line
|
||||
|
||||
|
||||
const lowToday = LOCAL_FORECAST.today.low;
|
||||
const highToday = LOCAL_FORECAST.today.high;
|
||||
|
||||
@ -101,6 +101,6 @@ const LOCAL_FORECAST = {
|
||||
today: { low: 64, high: 77 },
|
||||
tomorrow: { low: 68, high: 80 }
|
||||
};
|
||||
|
||||
|
||||
const { today: { low: lowToday, high: highToday }} = LOCAL_FORECAST;
|
||||
```
|
||||
|
@ -77,7 +77,7 @@ const HIGH_TEMPERATURES = {
|
||||
};
|
||||
|
||||
// Only change code below this line
|
||||
|
||||
|
||||
const highToday = HIGH_TEMPERATURES.today;
|
||||
const highTomorrow = HIGH_TEMPERATURES.tomorrow;
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
---
|
||||
id: 587d7b8a367417b2b2512b4c
|
||||
title: >-
|
||||
Use Destructuring Assignment with the Rest Parameter to Reassign Array
|
||||
Elements
|
||||
Use Destructuring Assignment with the Rest Parameter to Reassign Array Elements
|
||||
challengeType: 1
|
||||
forumTopicId: 301218
|
||||
dashedName: >-
|
||||
|
@ -14,7 +14,7 @@ These are classically called <dfn>getters</dfn> and <dfn>setters</dfn>.
|
||||
|
||||
Getter functions are meant to simply return (get) the value of an object's private variable to the user without the user directly accessing the private variable.
|
||||
|
||||
Setter functions are meant to modify (set) the value of an object's private variable based on the value passed into the setter function. This change could involve calculations, or even overwriting the previous value completely.
|
||||
Setter functions are meant to modify (set) the value of an object's private variable based on the value passed into the setter function. This change could involve calculations, or even overwriting the previous value completely.
|
||||
|
||||
```js
|
||||
class Book {
|
||||
|
Reference in New Issue
Block a user