From ccfe27b20368172d91786a7f3416e042b29bbaa2 Mon Sep 17 00:00:00 2001 From: Hin <873243610@qq.com> Date: Tue, 21 Sep 2021 21:37:55 +0800 Subject: Improve Learn/JavaScript/First_steps/Math, zh-CN (#2516) change places where readers may feel confusing. --- files/zh-cn/learn/javascript/first_steps/math/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files') diff --git a/files/zh-cn/learn/javascript/first_steps/math/index.html b/files/zh-cn/learn/javascript/first_steps/math/index.html index b9bb3e012f..2a0e7a7840 100644 --- a/files/zh-cn/learn/javascript/first_steps/math/index.html +++ b/files/zh-cn/learn/javascript/first_steps/math/index.html @@ -41,7 +41,7 @@ translation_of: Learn/JavaScript/First_steps/Math

我们甚至有不同类型的数字系统! 十进制是基数10(意味着它在每列使用0-9),但是我们也有这样的东西:

@@ -396,7 +396,7 @@ function updateBtn() {

新窗口打开

-

您可以在updateBtn()函数内看到正在使用的等号运算符。 在这种情况下,我们不会测试两个数学表达式是否具有相同的值 - 我们正在测试一个按钮的文本内容是否包含某个字符串 - 但它仍然是工作原理。 如果按钮当前按“启动机”,则将其标签更改为“停机”,并根据需要更新标签。 如果按下按钮当前正在说“停机”,我们再次将显示器交换回来。

+

您可以在updateBtn()函数内看到正在使用的等号运算符。 在这种情况下,我们不会测试两个数学表达式是否具有相同的值 - 我们正在测试一个按钮的文本内容是否包含某个字符串 - 但它仍然是工作原理。 如果按钮当前为“启动机器(start machine)”,则将其标签更改为“停止机器(stop machine)”,并根据需要更新标签。 如果按钮上写着“停机”时被按下,我们将显示回原来的内容。

Note: 这种在两个状态之间来回交换的行为通常被称为 切换 (toggle)。它在一个状态和另一个状态之间切换 - 点亮,熄灭等

-- cgit v1.2.3-54-g00ecf