aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/guide
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/javascript/guide')
-rw-r--r--files/zh-cn/web/javascript/guide/grammar_and_types/index.html4
-rw-r--r--files/zh-cn/web/javascript/guide/text_formatting/index.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/files/zh-cn/web/javascript/guide/grammar_and_types/index.html b/files/zh-cn/web/javascript/guide/grammar_and_types/index.html
index 0ea7538a96..8b00401fcc 100644
--- a/files/zh-cn/web/javascript/guide/grammar_and_types/index.html
+++ b/files/zh-cn/web/javascript/guide/grammar_and_types/index.html
@@ -447,8 +447,8 @@ console.log(a[0]); // 3</pre>
<pre class="brush: js notranslate">3.14
-.2345789 // -0.23456789
--3.12e+12 // -3.12*10<sup>12</sup>
-.1e-23 // 0.1*10<sup>-23</sup>=10<sup>-24</sup>=1e-24
+-3.12e+12 // -3.12*10^12
+.1e-23 // 0.1*10^(-23)=10^(-24)=1e-24
</pre>
<h3 id="对象字面量_Object_literals">对象字面量 (Object literals)</h3>
diff --git a/files/zh-cn/web/javascript/guide/text_formatting/index.html b/files/zh-cn/web/javascript/guide/text_formatting/index.html
index 522b3ed362..eac38b4502 100644
--- a/files/zh-cn/web/javascript/guide/text_formatting/index.html
+++ b/files/zh-cn/web/javascript/guide/text_formatting/index.html
@@ -62,7 +62,7 @@ typeof foo; // 返回 'object'</pre>
<pre class="brush: js notranslate">const firstString = '2 + 2'; //创建一个字符串字面量
const secondString = new String('2 + 2'); // 创建一个字符串对象
eval(firstString); // 返回数字 4
-eval(secondString); // 返回字符串 "2 + 2"</pre>
+eval(secondString); // 返回包含 "2 + 2" 的字符串对象</pre>
<p><code>String</code> 对象有一个属性 <code>length</code>,标识了字符串中 UTF-16 的码点个数。举例,下面的代码把 13 赋值给了<code>helloLength</code>,因为 "Hello, World!" 包含 13 个字符,每个字符用一个 UTF-16 码点表示。你可以通过数组的方式访问每一个码点,但你不能修改每个字符,因为字符串是不变的类数组对象: </p>