chore(i8n,curriculum): processed translations (#41490)

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
This commit is contained in:
camperbot
2021-03-14 21:20:39 -06:00
committed by GitHub
parent 5e563329ad
commit 903a301849
262 changed files with 2871 additions and 2708 deletions

View File

@ -1,6 +1,6 @@
---
id: 587d7b85367417b2b2512b39
title: Catch Missing Open and Closing Parenthesis After a Function Call
title: 捕捉函数调用后缺少的左括号和右括号
challengeType: 1
forumTopicId: 301185
dashedName: catch-missing-open-and-closing-parenthesis-after-a-function-call
@ -8,31 +8,33 @@ dashedName: catch-missing-open-and-closing-parenthesis-after-a-function-call
# --description--
When a function or method doesn't take any arguments, you may forget to include the (empty) opening and closing parentheses when calling it. Often times the result of a function call is saved in a variable for other use in your code. This error can be detected by logging variable values (or their types) to the console and seeing that one is set to a function reference, instead of the expected value the function returns.
当函数或方法不接受任何参数时,你可能忘记在调用它时加上空的左括号和右括号。 通常,函数调用的结果会保存在变量中,供其他代码使用。 可以通过将变量值(或其类型)打印到控制台,查看输出究竟是一个函数引用还是函数调用的返回值来检测这类错误。
The variables in the following example are different:
下面示例中的两个变量是不同的:
```js
function myFunction() {
return "You rock!";
}
let varOne = myFunction; // set to equal a function
let varTwo = myFunction(); // set to equal the string "You rock!"
let varOne = myFunction;
let varTwo = myFunction();
```
这里 `varOne` 是函数 `myFunction` `varTwo` 是字符串 `You rock!`
# --instructions--
Fix the code so the variable `result` is set to the value returned from calling the function `getNine`.
修复代码,将变量 `result` 设置为调用函数 `getNine` 返回的值。
# --hints--
Your code should fix the variable `result` so it is set to the number that the function `getNine` returns.
你应该修复变量 `result` 使其为函数 `getNine` 的返回的 number 值。
```js
assert(result == 9);
```
Your code should call the `getNine` function.
你应该调用 `getNine` 函数。
```js
assert(code.match(/getNine\(\)/g).length == 2);

View File

@ -1,6 +1,6 @@
---
id: 587d7b84367417b2b2512b37
title: Catch Mixed Usage of Single and Double Quotes
title: 捕捉单引号和双引号的混合用法
challengeType: 1
forumTopicId: 301188
dashedName: catch-mixed-usage-of-single-and-double-quotes
@ -8,40 +8,39 @@ dashedName: catch-mixed-usage-of-single-and-double-quotes
# --description--
JavaScript allows the use of both single (`'`) and double (`"`) quotes to declare a string. Deciding which one to use generally comes down to personal preference, with some exceptions.
JavaScript 允许使用单引号 (`'`) 和双引号 (`"`) 声明字符串。 决定使用哪一个通常看个人偏好,但有一些例外。
Having two choices is great when a string has contractions or another piece of text that's in quotes. Just be careful that you don't close the string too early, which causes a syntax error.
如果字符串中有缩写或存在一段带引号的文本,你就会明白为什么 JavaScript 允许两种引号了。 请注意,不要提前用引号结束字符串,这会导致语法错误。
Here are some examples of mixing quotes:
下面是混合使用引号的一些示例:
```js
// These are correct:
const grouchoContraction = "I've had a perfectly wonderful evening, but this wasn't it.";
const quoteInString = "Groucho Marx once said 'Quote me as saying I was mis-quoted.'";
// This is incorrect:
const uhOhGroucho = 'I've had a perfectly wonderful evening, but this wasn't it.';
```
Of course, it is okay to use only one style of quotes. You can escape the quotes inside the string by using the backslash (<code>\\</code>) escape character:
前两项是正确的,但第三项是不正确的。
当然,只使用一种引号也是可以的。 你可以使用反斜杠(`\`)转义字符来转义字符串中的引号:
```js
// Correct use of same quotes:
const allSameQuotes = 'I\'ve had a perfectly wonderful evening, but this wasn\'t it.';
```
# --instructions--
Fix the string so it either uses different quotes for the `href` value, or escape the existing ones. Keep the double quote marks around the entire string.
修复字符串,使其对 `href` 值使用不同的引号,或者转义现有的引号。 在整个字符串周围保留双引号。
# --hints--
Your code should fix the quotes around the `href` value "#Home" by either changing or escaping them.
你应通过更改或转义来修复 `href` 的值 `#Home` 周围的引号。
```js
assert(code.match(/<a href=\s*?('|\\")#Home\1\s*?>/g));
```
Your code should keep the double quotes around the entire string.
你应该在整个字符串外围保留双引号。
```js
assert(code.match(/"<p>.*?<\/p>";/g));

View File

@ -1,6 +1,6 @@
---
id: 587d7b86367417b2b2512b3b
title: Catch Off By One Errors When Using Indexing
title: 捕获使用索引的时候出现的错误
challengeType: 1
forumTopicId: 301189
dashedName: catch-off-by-one-errors-when-using-indexing
@ -8,52 +8,51 @@ dashedName: catch-off-by-one-errors-when-using-indexing
# --description--
<dfn>Off by one errors</dfn> (sometimes called OBOE) crop up when you're trying to target a specific index of a string or array (to slice or access a segment), or when looping over the indices of them. JavaScript indexing starts at zero, not one, which means the last index is always one less than the length of the item. If you try to access an index equal to the length, the program may throw an "index out of range" reference error or print `undefined`.
当试图访问字符串或数组的特定索引(分割或访问一个片段)或循环索引时,有时会出现 <dfn>Off by one errors</dfn> 错误(有时称为 OBOE。 JavaScript 索引从 0 开始,而不是 1这意味着最后一个索引总会比字符串或数组的长度少 1。 如果尝试访问等于长度的索引,程序可能会抛出“索引超出范围”引用错误或打印出 `undefined`
When you use string or array methods that take index ranges as arguments, it helps to read the documentation and understand if they are inclusive (the item at the given index is part of what's returned) or not. Here are some examples of off by one errors:
当使用将索引范围作为参数的字符串或数组方法时,阅读相关的文档并了解参数中的索引的包含性(即是否考虑进返回值中)很重要。 以下是一些错误的示例:
```js
let alphabet = "abcdefghijklmnopqrstuvwxyz";
let len = alphabet.length;
for (let i = 0; i <= len; i++) {
// loops one too many times at the end
console.log(alphabet[i]);
}
for (let j = 1; j < len; j++) {
// loops one too few times and misses the first character at index 0
console.log(alphabet[j]);
}
for (let k = 0; k < len; k++) {
// Goldilocks approves - this is just right
console.log(alphabet[k]);
}
```
第一个例子多了一次循环,第二个例子少了一次循环(漏掉了索引 0 处的字符), 第三个例子是正确的。
# --instructions--
Fix the two indexing errors in the following function so all the numbers 1 through 5 are printed to the console.
修复以下函数中的两个索引错误,将 1 到 5 之间(包含 1 和 5的所有数字打印到控制台。
# --hints--
Your code should set the initial condition of the loop so it starts at the first index.
应该设置循环的初始条件,使循环从第一个索引开始。
```js
assert(code.match(/i\s*?=\s*?0\s*?;/g).length == 1);
```
Your code should fix the initial condition of the loop so that the index starts at 0.
应修复循环的初始条件,使循环从索引 0 开始。
```js
assert(!code.match(/i\s?=\s*?1\s*?;/g));
```
Your code should set the terminal condition of the loop so it stops at the last index.
应该设置循环的终止条件,使循环在最后一个索引处停止。
```js
assert(code.match(/i\s*?<\s*?len\s*?;/g).length == 1);
```
Your code should fix the terminal condition of the loop so that it stops at 1 before the length.
应该修复循环的终止条件,使循环在索引为字符串长度减 1 的位置停止。
```js
assert(!code.match(/i\s*?<=\s*?len;/g));

View File

@ -1,6 +1,6 @@
---
id: 587d7b84367417b2b2512b36
title: 'Catch Unclosed Parentheses, Brackets, Braces and Quotes'
title: '捕获未闭合的括号、方括号、大括号和引号'
challengeType: 1
forumTopicId: 301190
dashedName: catch-unclosed-parentheses-brackets-braces-and-quotes
@ -8,23 +8,23 @@ dashedName: catch-unclosed-parentheses-brackets-braces-and-quotes
# --description--
Another syntax error to be aware of is that all opening parentheses, brackets, curly braces, and quotes have a closing pair. Forgetting a piece tends to happen when you're editing existing code and inserting items with one of the pair types. Also, take care when nesting code blocks into others, such as adding a callback function as an argument to a method.
要注意的另一个语法错误是所有的小括号、方括号、花括号和引号都必须配对。 当你编辑代码并插入新代码其中带有括号时,很容易忘记括号闭合。 此外,在将代码块嵌套到其他代码块时要小心,例如将回调函数作为参数添加到方法中。
One way to avoid this mistake is as soon as the opening character is typed, immediately include the closing match, then move the cursor back between them and continue coding. Fortunately, most modern code editors generate the second half of the pair automatically.
避免这种错误的一种方法是,一次性输入完这些符号,然后将光标移回它们之间继续编写。 好在现在大部分编辑器都会帮你自动补全。
# --instructions--
Fix the two pair errors in the code.
修复代码中的两个符号配对错误。
# --hints--
Your code should fix the missing piece of the array.
应该修复数组缺少的部分。
```js
assert(code.match(/myArray\s*?=\s*?\[\s*?1\s*?,\s*?2\s*?,\s*?3\s*?\];/g));
```
Your code should fix the missing piece of the `.reduce()` method. The console output should show that "Sum of array values is: 6".
应该修复 `.reduce()` 方法缺少的部分。 控制台应该输出 `Sum of array values is: 6`
```js
assert(arraySum === 6);

View File

@ -1,6 +1,6 @@
---
id: 587d7b85367417b2b2512b38
title: Catch Use of Assignment Operator Instead of Equality Operator
title: 捕获使用赋值运算符而不是相等运算符
challengeType: 1
forumTopicId: 301191
dashedName: catch-use-of-assignment-operator-instead-of-equality-operator
@ -8,37 +8,39 @@ dashedName: catch-use-of-assignment-operator-instead-of-equality-operator
# --description--
Branching programs, i.e. ones that do different things if certain conditions are met, rely on `if`, `else if`, and `else` statements in JavaScript. The condition sometimes takes the form of testing whether a result is equal to a value.
分支程序,即在满足某些条件时执行不同操作的程序,依赖于 JavaScript 中的`if``else if``else`语句。 条件有时采取测试一个结果是否等于一个值的形式。
This logic is spoken (in English, at least) as "if x equals y, then ..." which can literally translate into code using the `=`, or assignment operator. This leads to unexpected control flow in your program.
这种逻辑可以表述为“如果 x 等于 y ,则......”,听起来像是可以使用 `=`(即赋值运算符)。 然而,这会导致程序中流程出问题。
As covered in previous challenges, the assignment operator (`=`) in JavaScript assigns a value to a variable name. And the `==` and `===` operators check for equality (the triple `===` tests for strict equality, meaning both value and type are the same).
如前面的挑战所述JavaScript 中的赋值运算符 (`=`) 是用来为变量名赋值的。 并且 `==` `===` 运算符检查相等性(三等号 `===` 是用来测试是否严格相等的,严格相等的意思是值和类型都必须相同)。
The code below assigns `x` to be 2, which evaluates as `true`. Almost every value on its own in JavaScript evaluates to `true`, except what are known as the "falsy" values: `false`, `0`, `""` (an empty string), `NaN`, `undefined`, and `null`.
下面的代码将 `x` 赋值为 2表达式会在执行后得到 `true`。 JavaScript 会把大部分的值都视为 `true`,除了所谓的 “falsy”值`false``0``""`(空字符串)、`NaN``undefined` `null`
```js
let x = 1;
let y = 2;
if (x = y) {
// this code block will run for any value of y (unless y were originally set as a falsy)
} else {
// this code block is what should run (but won't) in this example
}
```
在这个示例中,除非 `y` 值是假值,否则当 `y` 为任何值时,`if` 语句中的代码块都会运行。 我们期望运行的 `else` 代码块实际上将不会运行。
# --instructions--
Fix the condition so the program runs the right branch, and the appropriate value is assigned to `result`.
修复条件语句,以便程序运行正确的分支,并给 `result` 赋正确的值。
# --hints--
Your code should fix the condition so it checks for equality, instead of using assignment.
应该修复条件语句,使其判断是否相等,而不是赋值。
```js
assert(result == 'Not equal!');
```
The condition should use either `==` or `===` to test for equality.
条件语句可以使用 `==` `===` 来测试是否相等。
```js
assert(code.match(/x\s*?===?\s*?y/g));

View File

@ -1,6 +1,6 @@
---
id: 587d7b86367417b2b2512b3d
title: Prevent Infinite Loops with a Valid Terminal Condition
title: 使用有效的终止条件防止无限循环
challengeType: 1
forumTopicId: 301192
dashedName: prevent-infinite-loops-with-a-valid-terminal-condition
@ -8,9 +8,9 @@ dashedName: prevent-infinite-loops-with-a-valid-terminal-condition
# --description--
The final topic is the dreaded infinite loop. Loops are great tools when you need your program to run a code block a certain number of times or until a condition is met, but they need a terminal condition that ends the looping. Infinite loops are likely to freeze or crash the browser, and cause general program execution mayhem, which no one wants.
最后一个话题是可怕的无限循环。 当需要程序运行代码块一定次数或满足条件时,循环是很好的工具,但是它们需要终止条件来结束循环。 无限循环可能会使浏览器冻结或崩溃,并导致程序执行混乱,没有人想要这样的结果。
There was an example of an infinite loop in the introduction to this section - it had no terminal condition to break out of the `while` loop inside `loopy()`. Do NOT call this function!
在本节的介绍中有一个无限循环的例子——它没有终止条件来摆脱`loopy()`内的`while`循环。 不要调用这个函数!
```js
function loopy() {
@ -20,21 +20,21 @@ function loopy() {
}
```
It's the programmer's job to ensure that the terminal condition, which tells the program when to break out of the loop code, is eventually reached. One error is incrementing or decrementing a counter variable in the wrong direction from the terminal condition. Another one is accidentally resetting a counter or index variable within the loop code, instead of incrementing or decrementing it.
程序员的工作是确保最终达到终止条件,该条件告诉程序何时跳出循环。 有一种错误是从终端条件向错误方向递增或递减计数器变量。 另一种是在循环代码中意外重置计数器或索引变量,而不是递增或递减它。
# --instructions--
The `myFunc()` function contains an infinite loop because the terminal condition `i != 4` will never evaluate to `false` (and break the looping) - `i` will increment by 2 each pass, and jump right over 4 since `i` is odd to start. Fix the comparison operator in the terminal condition so the loop only runs for `i` less than or equal to 4.
`myFunc()`函数包含一个无限循环,因为终止条件`i != 4`永远不会为`false`(并中断循环) -`i`将每次递增 2然后跳过 4因为`i`是从奇数开始递增。 在终端条件中输入比较运算符,使循环仅在`i`小于或等于 4 的情况下运行。
# --hints--
Your code should change the comparison operator in the terminal condition (the middle part) of the `for` loop.
你应该在`for`循环的终止条件(中间部分)中更改比较运算符。
```js
assert(code.match(/i\s*?<=\s*?4;/g).length == 1);
```
Your code should fix the comparison operator in the terminal condition of the loop.
你应该修改比较运算符来避免出现死循环。
```js
assert(!code.match(/i\s*?!=\s*?4;/g));

View File

@ -1,6 +1,6 @@
---
id: 587d7b83367417b2b2512b37
title: Understanding the Differences between the freeCodeCamp and Browser Console
title: 了解 freeCodeCamp 和浏览器控制台之间的差异
challengeType: 1
forumTopicId: 301193
dashedName: understanding-the-differences-between-the-freecodecamp-and-browser-console
@ -8,27 +8,27 @@ dashedName: understanding-the-differences-between-the-freecodecamp-and-browser-c
# --description--
You may have noticed that some freeCodeCamp JavaScript challenges include their own console. This console behaves a little differently than the browser console you used in the last challenge.
你可能已经注意到一些 freeCodeCamp JavaScript 的挑战有自己的控制台。 这些控制台的行为与上一次挑战中使用的浏览器控制台略有不同。
The following challenge is meant to highlight the main difference between the freeCodeCamp console and your browser console.
以下挑战旨在强调 freeCodeCamp 控制台与浏览器控制台之间的一些差异。
When you run ordinary JavaScript, the browser's console will display your `console.log()` statements the exact number of times it is called.
当在浏览器中加载并运行 JavaScript 文件时,`console.log()` 语句会在控制台中按照调用的次数准确地打印出要求的内容。
The freeCodeCamp console will print your `console.log()` statements a short time after the editor detects a change in the script, as well as during testing.
在编辑器检测到脚本中的更改之后以及测试期间freeCodeCamp 控制台将打印 `console.log()` 语句。
The freeCodeCamp console is cleared before the tests are run and, to avoid spam, only prints the logs during the first test (see the note below for exceptions).
在运行测试之前,将清除 freeCodeCamp 控制台,为避免破坏,仅在第一次测试期间打印日志(请参见下面的注释)。
If you would like to see every log for every test, run the tests, and open the browser console. If you prefer to use the browser console, and want it to mimic the freeCodeCamp console, place `console.clear()` before any other `console` calls, to clear the browser console.
如果你想看到每次测试的日志,运行测试,并打开浏览器控制台。 如果你喜欢使用浏览器控制台,想要它模仿 freeCodeCamp 控制台,请在其他 `console` 调用前加上 `console.clear()`,以清除浏览器控制台。
**Note:** `console.log`s inside functions are printed to the freeCodeCamp console whenever those functions are called, this can help debugging functions that are called during testing.
**注意:** 每次调用函数时,函数内的 `console.log` 都会被打印到 freeCodeCamp 控制台。 这样可以帮助在测试期间调试函数。
# --instructions--
First, use `console.log` to log the `output` variable. Then, use `console.clear` to clear the browser console.
首先,使用 `console.log` 打印 `output` 变量。 然后使用 `console.clear` 清除浏览器控制台。
# --hints--
You should use `console.clear()` to clear the browser console.
应该使用 `console.clear()` 清除浏览器控制台。
```js
assert(
@ -38,7 +38,7 @@ assert(
);
```
You should use `console.log()` to print the `output` variable.
应该使用 `console.log()` 打印 `output` 变量。
```js
assert(__helpers.removeWhiteSpace(code).match(/console\.log\(output\)/));

View File

@ -1,6 +1,6 @@
---
id: 587d7b86367417b2b2512b3c
title: Use Caution When Reinitializing Variables Inside a Loop
title: 重新初始化循环中的变量时要小心
challengeType: 1
forumTopicId: 301194
dashedName: use-caution-when-reinitializing-variables-inside-a-loop
@ -8,29 +8,29 @@ dashedName: use-caution-when-reinitializing-variables-inside-a-loop
# --description--
Sometimes it's necessary to save information, increment counters, or re-set variables within a loop. A potential issue is when variables either should be reinitialized, and aren't, or vice versa. This is particularly dangerous if you accidentally reset the variable being used for the terminal condition, causing an infinite loop.
有时需要在循环中保存信息以增加计数器或重置变量。 一个潜在的问题是变量什么时候该重新初始化,什么时候不该重新初始化,反之亦然。 如果你不小心重置了用于终止条件的变量,导致无限循环,这将特别危险。
Printing variable values with each cycle of your loop by using `console.log()` can uncover buggy behavior related to resetting, or failing to reset a variable.
使用`console.log()`在每个循环中打印变量值可以发现与重置相关的错误或者重置变量失败。
# --instructions--
The following function is supposed to create a two-dimensional array with `m` rows and `n` columns of zeroes. Unfortunately, it's not producing the expected output because the `row` variable isn't being reinitialized (set back to an empty array) in the outer loop. Fix the code so it returns a correct 3x2 array of zeroes, which looks like `[[0, 0], [0, 0], [0, 0]]`.
以下函数应该创建一个具有`m`行和`n`列“零”的二维数组。 不幸的是,它没有产生预期的输出,因为`row`变量没有在外部循环中重新初始化(设置回空数组)。 修改代码,使其正确地返回包含 3 行 2 列“零”的二维数组,即`[[0, 0], [0, 0], [0, 0]]`
# --hints--
Your code should set the `matrix` variable to an array holding 3 rows of 2 columns of zeroes each.
应将变量 `matrix` 设置为 3 行 2 列“零”的二维数组。
```js
assert(JSON.stringify(matrix) == '[[0,0],[0,0],[0,0]]');
```
The `matrix` variable should have 3 rows.
变量 `matrix` 应有 3 行。
```js
assert(matrix.length == 3);
```
The `matrix` variable should have 2 columns in each row.
变量 `matrix` 每行应有 2 列。
```js
assert(

View File

@ -1,6 +1,6 @@
---
id: 587d7b83367417b2b2512b33
title: Use the JavaScript Console to Check the Value of a Variable
title: 使用控制台检查变量值
challengeType: 1
forumTopicId: 18372
dashedName: use-the-javascript-console-to-check-the-value-of-a-variable
@ -8,23 +8,23 @@ dashedName: use-the-javascript-console-to-check-the-value-of-a-variable
# --description--
Both Chrome and Firefox have excellent JavaScript consoles, also known as DevTools, for debugging your JavaScript.
Chrome Firefox 都有出色的 JavaScript 控制台(也称为 DevTools可以用来调试 JavaScript 代码
You can find Developer tools in your Chrome's menu or Web Console in Firefox's menu. If you're using a different browser, or a mobile phone, we strongly recommend switching to desktop Firefox or Chrome.
可以在 Chrome 的菜单中找到“开发者工具”或 FireFox 的菜单中的 “Web 控制台”。 如果你使用其他浏览器或手机,我们强烈建议你切换到桌面版 Firefox Chrome
The `console.log()` method, which "prints" the output of what's within its parentheses to the console, will likely be the most helpful debugging tool. Placing it at strategic points in your code can show you the intermediate values of variables. It's good practice to have an idea of what the output should be before looking at what it is. Having check points to see the status of your calculations throughout your code will help narrow down where the problem is.
`console.log()` 方法可能是最有用的调试工具,它可以将括号中的内容输出到控制台。 将它放在代码中的关键点可以显示变量在当时的值。 在查看输出之前,最好先想清楚输出应该是什么。 在整个代码中使用检查点来查看计算状态将有助于缩小问题的范围。
Here's an example to print 'Hello world!' to the console:
下面是输出 `Hello world!` 字符串到控制台的示例:
`console.log('Hello world!');`
# --instructions--
Use the `console.log()` method to print the value of the variable `a` where noted in the code.
请使用 `console.log()` 方法在代码中注明的地方输出变量 `a` 的值。
# --hints--
Your code should use `console.log()` to check the value of the variable `a`.
应使用 `console.log()` 来检查变量 `a` 的值。
```js
assert(code.match(/console\.log\(a\)/g));

View File

@ -1,6 +1,6 @@
---
id: 587d7b84367417b2b2512b34
title: Use typeof to Check the Type of a Variable
title: 使用 type of 检查变量的类型
challengeType: 1
forumTopicId: 18374
dashedName: use-typeof-to-check-the-type-of-a-variable
@ -8,38 +8,40 @@ dashedName: use-typeof-to-check-the-type-of-a-variable
# --description--
You can use `typeof` to check the data structure, or type, of a variable. This is useful in debugging when working with multiple data types. If you think you're adding two numbers, but one is actually a string, the results can be unexpected. Type errors can lurk in calculations or function calls. Be careful especially when you're accessing and working with external data in the form of a JavaScript Object Notation (JSON) object.
可以使用 `typeof` 检查变量的数据结构或类型。 在处理多种数据类型时,这会对调试很有帮助。 如果想计算两数之和,但实际传入了一个字符串参数,则结果可能是错误的。 类型错误可能隐藏在计算或函数调用中。 当你以 JavaScript 对象JSON的形式访问和使用外部数据时尤其要小心。
Here are some examples using `typeof`:
下面是使用 `typeof` 的一些示例:
```js
console.log(typeof ""); // outputs "string"
console.log(typeof 0); // outputs "number"
console.log(typeof []); // outputs "object"
console.log(typeof {}); // outputs "object"
console.log(typeof "");
console.log(typeof 0);
console.log(typeof []);
console.log(typeof {});
```
JavaScript recognizes six primitive (immutable) data types: `Boolean`, `Null`, `Undefined`, `Number`, `String`, and `Symbol` (new with ES6) and one type for mutable items: `Object`. Note that in JavaScript, arrays are technically a type of object.
控制台将按顺序显示字符串 `string``number``object``object`
JavaScript 有六种原始(不可变)数据类型:`Boolean``Null``Undefined``Number``String``Symbol`ES6 中新增的),和一种可变的数据类型:`Object`。 注意:在 JavaScript 中,数组在本质上是一种对象。
# --instructions--
Add two `console.log()` statements to check the `typeof` each of the two variables `seven` and `three` in the code.
添加两个 `console.log()` 语句来检查代码中的两个变量 `seven` `three` `typeof` 值。
# --hints--
Your code should use `typeof` in two `console.log()` statements to check the type of the variables.
应在两个 `console.log()` 语句中使用 `typeof` 来检查变量的类型。
```js
assert(code.match(/console\.log\(typeof[\( ].*\)?\)/g).length == 2);
```
Your code should use `typeof` to check the type of the variable `seven`.
应使用 `typeof` 来检查变量 `seven` 的类型。
```js
assert(code.match(/typeof[\( ]seven\)?/g));
```
Your code should use `typeof` to check the type of the variable `three`.
应使用 `typeof` 来检查变量 `three` 的类型。
```js
assert(code.match(/typeof[\( ]three\)?/g));